How to create RegistryKey in VB for WP7? - Windows Phone 7 Software Development

hello guys
I have an idea for a pllicazione wp7 but I have a small problem to beginners.
I'm creating my application with VB but I can not change the Registry Key
with VB for win 7 so I did:
Imports Microsoft.Win32
Public Class Form1
Private Sub Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RegKey As RegistryKey
RegKey = Registry.LocalMachine.OpenSubKey ("SOFTWARE", True)
regKey.CreateSubKey ("MyApp")
regKey.Close ()
end Sub
end Class
WP visual studio but this does not work,
Someone can help me? Thanks!

Use WP7 Root Tools SDK.

Thanks

Related

UserAgent problems with Planet3 + helmi_c ROMs

Hey there!
I have installed Some of helmi_c ROMs (AKU 3.5 beta 13, WM6) and I'm always facing the same problems with the UserAgent. The first thing I noticed was that if I create a new connection (Celularline 3G) and I connect to the Internet I don't see a "3G" connection symbol in the taskbar but only a "G". This wasn't so with my last ROM (German 1.30.96)
Now to the main problem:
My cellular network provider in Austria is "Three". To get to their mobile internet zone called "Planet3" I have to change the UserAgent Default="Nokia6680" so the server thinks I am this cell phone and then I can watch the content. This works with all ROMs I found at the FTP server, except those from helmi_c (those I've tested). I also tried a ROM from Ivan (AKU 3.2) and this worked.
Now I want to switch to WM6 but it doesn't work.
I hope you guys can help me!
Best regards
Tom
ThomasPP said:
Hey there!
I have installed Some of helmi_c ROMs (AKU 3.5 beta 13, WM6) and I'm always facing the same problems with the UserAgent. The first thing I noticed was that if I create a new connection (Celularline 3G) and I connect to the Internet I don't see a "3G" connection symbol in the taskbar but only a "G". This wasn't so with my last ROM (German 1.30.96)
Now to the main problem:
My cellular network provider in Austria is "Three". To get to their mobile internet zone called "Planet3" I have to change the UserAgent Default="Nokia6680" so the server thinks I am this cell phone and then I can watch the content. This works with all ROMs I found at the FTP server, except those from helmi_c (those I've tested). I also tried a ROM from Ivan (AKU 3.2) and this worked.
Now I want to switch to WM6 but it doesn't work.
I hope you guys can help me!
Best regards
Tom
Click to expand...
Click to collapse
The answer to the first problem is simple - almost all of the AKU 3.5 / WM6 ROMs on this site specifically say that they don't support the change of that little icon from G to 3G and vice versa. You should see the main icon change from G to 3G, though.
Have you tried this:
http://forum.xda-developers.com/showthread.php?t=293375
Hello again!
Thanks for your help, I also found this thread and copied the dll file, now it shows the right icon... But this was only a side effect of the main problem.
I installed Netfront, and when I change the UserAgent in the program itself it works perfectly. So it must be a problem of PIE. You might ask, why I don't use Netfront overall? Well, the answer is simple, Netfront doesn't support to open a rtsp stream in the Streaming Player, and I want to watch the videos and TV programs on my Qtek.
So please helmi_c or someone else, help me to solve my problem!
I think this doesn't only affect me, but many others too.
Best regards
Tom
I'd be interested in the solution to the UserAgent problem too, if for no other reason than to make Google give me the standard page, rather than the PDA version.
Pocket IE in Crossbow with MultiIE installed is now my browser of choice over Opera 8.6, but it is a bit of a pain that I can't seem to change the UserAgent, despite altering a number of settings in the registry.
Cheers,
Steve
Can't help with the user agent thing, but for Google, you can use the following address to get "full" Google on a PPC without any registry edits...
http://www.google.com/webhp
Still need some help plz!
I can limit this problem to the PIE, so does anyone know why the phone ignores the UserAgent? What registry key can I change in addition sot that the phone sends the right UserAgent?
best regards
Tom
*push*
no solution now... plz help!
Same problem on HTC TyTn with AKU3.3+.
Maybe the PIE doesn't send the User Agent, or the wrond User Agent.
How can we read out the User Agent String in the sent information?
http://forum.xda-developers.com/showthread.php?t=290818
this thread may be of some help
No doesn't help, tried like posted in this thread, but still the same.
It is 99% the PIE which doesn't send the User Agent, because with older ROM it works again, and with Netfront too.
There is really a bug in PIE on AKU3.3 and as i heard on WM6 too in german forum.
Here the Standard User Agent Setting:
Cache-Control: max-age=259200
Connection: keep-alive
Via: 1.1 proxy.google.com:80 (squid)
Accept: text/html, application/xhtml+xml, image/png, image/tiff, image/jpeg, image/gif, image/bmp, text/plain, application/pdf;q=0.1, application/zip;q=0.1, application/msword;q=0.1, application/vnd.ms-excel;q=0.1, application/wordperfect, application/x-wordperfect, application/wpwin, application/x-wpwin, */*;q=0.1
Accept-Charset: ISO-8859-1, UTF-8, *;q=0.5
Accept-Encoding: gzip
Accept-Language: en-us
Host: www.fiddlertool.com
Referer: HYPERLINK http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder
X-Forwarded-For: deleted, unknown
ASPNET's HTTPBrowserCapabilities object reports that based on the User-Agent, your Browser has the following capabilities:
Type = IE6
Name = IE
Version = 6.0
Major Version = 6
Minor Version = 0
Platform = Win2000
Is Beta = False
Is Crawler = False
Is AOL = False
Is Win16 = False
Is Win
32 = True
Supports Frames = True
Supports Tables = True
Supports Cookies = True
Supports VBScript = True
Supports JavaScript = True
Supports Java Applets = True
Supports ActiveX Controls = True
Here with changes made to Registry at User Agent-String:
HKLM\SOFTWARE\Microsoft\Current Version\Internet Settings\5.0\User Agent\
Default changed to another value e.g. Nokia
Cache-Control: max-age=259200
Connection: keep-alive
Via: 1.1 proxy.google.com:80 (squid)
Accept: text/html, application/xhtml+xml, image/png, image/tiff, image/jpeg, image/gif, image/bmp, text/plain, application/pdf;q=0.1, application/zip;q=0.1, application/msword;q=0.1, application/vnd.ms-excel;q=0.1, application/wordperfect, application/x-wordperfect, application/wpwin, application/x-wpwin, */*;q=0.1
Accept-Charset: ISO-8859-1, UTF-8, *;q=0.5
Accept-Encoding: gzip
Accept-Language: en-us
Host: www.fiddlertool.com
Referer: HYPERLINK http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx http://blogs.msdn.com/ie/archive/2005/04/27/412813.aspx
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder
X-Forwarded-For: deleted, unknown
ASPNET's HTTPBrowserCapabilities object reports that based on the User-Agent, your Browser has the following capabilities:
Type = IE6
Name = IE
Version = 6.0
Major Version = 6
Minor Version = 0
Platform = Win2000
Is Beta = False
Is Crawler = False
Is AOL = False
Is Win16 = False
Is
Win32 = True
Supports Frames = True
Supports Tables = True
Supports Cookies = True
Supports VBScript = True
Supports JavaScript = True
Supports Java Applets = True
Supports ActiveX Controls = True
As we can see the User Agent is still Mozilla/4.0, even if changing all Mozilla-Strings to Nokia, always sending Mozilla/4.0. The User Agent seems to be written constantly to one of the IE-Files in Windows Directory. Can some developer change the 4 hidden files beginning with IE in Windows-dir to ones from Trinity-ROM or AKU2.3-ROM? There it's working.
This is the sent User Agent when Registry Key change is working and sent correctly. Shown as Echo at http://fiddlertool.com/useragent.aspx
Your browser sent the following headers:
Connection: Keep-Alive
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Encoding: gzip, deflate
Accept-Language: de-at
Host: fiddlertool.com
User-Agent: Nokia (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.1)
UA-CPU: x86
________________________________________
ASPNET's HTTPBrowserCapabilities object reports that based on the User-Agent, your Browser has the following capabilities:
Type = Unknown
Name = Nokia
Version = 0.0
Major Version = 0
Minor Version = 0
Platform = WinNT
Is Beta = False
Is Crawler = False
Is AOL = False
Is Win16 = False
Is Win32 = True
Supports Frames = False
Supports Tables = False
Supports Cookies = False
Supports VBScript = False
Supports JavaScript = False
Supports Java Applets = False
Supports ActiveX Controls = False
The User Agent can be read out here: http://fiddlertool.com/useragent.aspx
A solution is here for making the User Agent changeable again with AKU3.3+, maybe for Universal too:
http://forum.xda-developers.com/showthread.php?p=1184509#post1184509

In Which Language You Develop For WM?

For Windows Mobile, I develop in C# amd Pascal, but which language you use?
I use C++, faster (loading if not at run time) less memory overheads, and lets you do more...
I use C++ only for Linux development
PS: Why you haven't voted?
Some have voted for Other and haven't posted which is the language, then please post to share for the others
i use c#, and it's not simple at all, this thing can do dirty things!
anaadoul said:
I use C#, and it's not simple at all
Click to expand...
Click to collapse
Here is an example of it:
C# For Windows:
Code:
string path = @"c:\temp\MyTest.txt";
File.ReadAllText(path);
On Windows Mobile C#:
Code:
static string ReadAllText(string path) {
using (var r = new StreamReader(path)) {
return r.ReadToEnd();
}
}
All because .Net Compact Framework don't recognize File.ReadAllText and the other File.*.
I have actually voted for three of of the above. For the following reasons :-
C Used for Win32 model apps.
C++ MFC Apps
C# .NET apps
All three are suberb in their own right, but glow brighter in their own area. Pick the one that works for you, and for what you are trying to do in the first place.
Very good technologys

[DLL] SciLor's HD2/Leo Multitouch .NET CF DLL

Hello, XDA's
Due to the discovered HD2 Multitouch captilities I have developed a .net cf dll for easy use.
It converts the Multitouch events to normal Mouse events
SciLor's .NET CF MultiTouch DLL v0.1 adds MultiTouch-Support to your existing .NET CF software very easily (Currently only for the HD2):
If I release a new DLL, it WILL be fully compatible to the previous one!
First of all you will have to add your app to the PinchToZoom Whitelist in the registry:
Code:
[HKEY_LOCAL_MACHINE\Software\HTC\TouchGL\Pinch\WhiteList\YourApp]
"ProcName"="YouAppProcessName.exe"
After adding, soft reset!
Then add the "SciLors-MultiTouch.dll" as reference in your Visual Studio project. Beware, it is not allowed to change the assembly name! It must stay "SciLors-MultiTouch.dll" or it will not work!
Afterwards declare the MultiTouch Class:
VB.NET:
Code:
Dim myMultiTouch As New SciLorsMultiTouch.SciLorsMultiTouch
C#:
Code:
SciLorsMultiTouch.SciLorsMultiTouch myMultiTouch = new SciLorsMultiTouch.SciLorsMultiTouch();
Then you add following to your Form_Load event:
VB.NET:
Code:
Call myMultiTouch.CatchWndProc(Me)
AddHandler myMultiTouch.MouseDown, AddressOf frmMain_MouseDown
AddHandler myMultiTouch.MouseMove, AddressOf frmMain_MouseMove
AddHandler myMultiTouch.MouseUp, AddressOf frmMain_MouseUp
C#:
Code:
myMultiTouch.CatchWndProc(this);
myMultiTouch.MouseDown += frmMain_MouseDown;
myMultiTouch.MouseMove += frmMain_MouseMove;
myMultiTouch.MouseUp += frmMain_MouseUp;
Now, at every MultiTouch Event it gets delegated to your frmMain_Mouse* procedures (There will be always 2 Events fired due to there existing 2 Fingers on the screen ). You can easily detect wheather the mouse event comes from a normal mouse-press or a multitouch finger.
Code:
Single Finger:
Windows.Forms.MouseButtons.None or MouseButton = Windows.Forms.MouseButtons.Left
MultiTouch:
Finger 1: Windows.Forms.MouseButtons.Middle
Finger 2: Windows.Forms.MouseButtons.Right
Code Examples:
VB.NET:
Code:
Public Structure MouseState
Dim Position As Point
Dim MouseDown As Boolean
End Structure
Public Fingers(2) As MouseState
Public Sub frmMain_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles frmMain.MouseDown
Dim ButtonID As Byte = ButtonToID(e.Button)
With Fingers(ButtonID)
.Position.X = e.X
.Position.Y = e.Y
.MouseDown = True
End With
End Sub
Public Sub frmMain_MouseMoveByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles frmMain.MouseMove
Dim ButtonID As Byte = ButtonToID(e.Button)
With Fingers(ButtonID)
.Position.X = e.X
.Position.Y = e.Y
.MouseDown = True
End With
End Sub
Public Sub frmMain_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles frmMain.MouseUp
Dim ButtonID As Byte = ButtonToID(e.Button)
With Fingers(ButtonID)
.Position.X = e.X
.Position.Y = e.Y
.MouseDown = False
End With
End Sub
Private Function ButtonToID(ByVal MouseButton As MouseButtons)
If MouseButton = Windows.Forms.MouseButtons.None Or MouseButton = Windows.Forms.MouseButtons.Left Then
Return 0
ElseIf MouseButton = Windows.Forms.MouseButtons.Middle Then
Return 1
Else
Return 2
End If
End Function
C#:
Code:
public struct MouseState
{
public Point Position;
public bool MouseDown;
}
public MouseState[] Fingers = new MouseState[3];
public void pctDraw_MouseDown(object sender, MouseEventArgs e)
{
int ButtonID = Conversions.ToByte(this.ButtonToID(e.Button));
this.Fingers[ButtonID].Position.X = e.X;
this.Fingers[ButtonID].Position.Y = e.Y;
this.Fingers[ButtonID].MouseDown = true;
}
public void pctDraw_MouseMove(object sender, MouseEventArgs e)
{
int ButtonID = Conversions.ToByte(this.ButtonToID(e.Button));
this.Fingers[ButtonID].Position.X = e.X;
this.Fingers[ButtonID].Position.Y = e.Y;
this.Fingers[ButtonID].MouseDown = true;
}
public void pctDraw_MouseUp(object sender, MouseEventArgs e)
{
int ButtonID = Conversions.ToByte(this.ButtonToID(e.Button));
this.Fingers[ButtonID].Position.X = e.X;
this.Fingers[ButtonID].Position.Y = e.Y;
this.Fingers[ButtonID].MouseDown = false;
}
private object ButtonToID(MouseButtons MouseButton)
{
if ((MouseButton == MouseButtons.None) | (MouseButton == MouseButtons.Left))
{
return 0;
}
if (MouseButton == MouseButtons.Middle)
{
return 1;
}
return 2;
}
-Multiple Instances are not supported and not needed (Multitouch events fire allways, everywhere on the form)!
-The Mouse-Coordinates are allways relative to the forms top-left corner.
Download at:
http://www.scilor.com/hd2-leo-dotNetCfMultiTouchDLL.html
Exelent work you've done here mate, keep it up.
I will update this to the best Multitouch solution I find
The dll will kept compatible to the previous versions so, if the author of a software forgets to update to the best DLL you can do it manually
rofl author is newb,
dev need no external dlls to realize double touch.
Its called............. gestures.
Download Winmo 6.5 sdk for gesture.h and lib.
Gesture GID_DOUBLESELECT implement two finger tracking on screen.
So..... lets waiting Windows Mobile 7 sdk for pure multitouch support
iperov said:
rofl author is newb,
dev need no external dlls to realize double touch.
Its called............. gestures.
Download Winmo 6.5 sdk for gesture.h and lib.
Gesture GID_DOUBLESELECT implement two finger tracking on screen.
So..... lets waiting Windows Mobile 7 sdk for pure multitouch support
Click to expand...
Click to collapse
First of all you are the newb
According to http://msdn.microsoft.com/en-us/library/ee207148.aspx the GID_DOUBLESELECT is just for a double tap.
A double tap represents the left double click of a mouse.
The application receives a GID_DOUBLESELECT gesture message when the finger–up events occur in a defined time period and within a specific distance of each other.
Click to expand...
Click to collapse
And has nothing to do with multitouch finger tracking
The dll should easily extent any .net program with a multitouch fingertracking very easily.
GID_ZOOM 3 The zoom gesture.
http://msdn.microsoft.com/en-us/library/dd940543(VS.85).aspx
iperov said:
GID_ZOOM 3 The zoom gesture.
http://msdn.microsoft.com/en-us/library/dd940543(VS.85).aspx
Click to expand...
Click to collapse
This is for Window 7
Man please read before thinking knowing more
Very nice, Scilor. I'll try it in my cover browser app that I am working on
Just a question, how do you handle the absence of HTC dll ? In my case I am making a generic application with enhanced functionality for HD2.
so how enable multitouch without white-listing? i think HTC driver quering some interfaces, and translate double touch as windows messages to foregroung active window, if parent process is white-listed?
iperov said:
so how enable multitouch without white-listing? i think HTC driver quering some interfaces, and translate double touch as windows messages to foregroung active window, if parent process is white-listed?
Click to expand...
Click to collapse
lolololol, you totally got owned, and you completely deserved it for trying to call someone out in a really douchebag way when you actually had no clue what you were talking about. Nice job trying to save face and be diplomatic NOW though...
SciLor, keep up the good work this is awesome
iperov said:
rofl author is newb,
dev need no external dlls to realize double touch.
Its called............. gestures.
Download Winmo 6.5 sdk for gesture.h and lib.
Gesture GID_DOUBLESELECT implement two finger tracking on screen.
So..... lets waiting Windows Mobile 7 sdk for pure multitouch support
Click to expand...
Click to collapse
P.S. are you still "rofl"? Cuz I am!
better, get touch.dll and implement multitouch support
Yes, hack it in, very nice
If I would do that, the attack point is the "TouchGL.dll" I have already discovered the important functions...
Yup.
Try deblock checkings in Touch.dll wich will loading PenTrac.dll,
PenTrac.dll this will be ur driver.
Then define func gMultipointHook, and log it.
or
hook gMultipointHook in TouchGL
people waiting...
I already tried to hook a dll over .net but there seems to be impossible.
I have to stick to c++, but due to I am not very familiar with it, I will need much more time
So, is there any progress?
I'm still looking for a way to get two independant touch inputs, not just pinch to zoom
I'm counting on you!
VanKurt said:
So, is there any progress?
I'm still looking for a way to get two independant touch inputs, not just pinch to zoom
I'm counting on you!
Click to expand...
Click to collapse
I am tryimg to fimd a better way for real multittoich
By the way: why isn't HTC publishing a powerfull and easy to use Multitouch SDK?
I think it would be in there own interest to have as many developers out there create cool games and apps using this technology. That would be a great advertisement for the HD2...
And since they have all the code at their hands it wouldn't be too much work either.
ARGH, how I hate this. On all other plattforms (iPhone, Android) EVERY feature of the phone (from Multitouch, GSensor, GPS etc.) is easily accessible and well documented...
VanKurt said:
By the way: why isn't HTC publishing a powerfull and easy to use Multitouch SDK?
I think it would be in there own interest to have as many developers out there create cool games and apps using this technology. That would be a great advertisement for the HD2...
And since they have all the code at their hands it wouldn't be too much work either.
ARGH, how I hate this. On all other plattforms (iPhone, Android) EVERY feature of the phone (from Multitouch, GSensor, GPS etc.) is easily accessible and well documented...
Click to expand...
Click to collapse
The Problem is that the "Multitouch" is implented by HTC and really hacked in...
Hi, thanks to your dll Scilor's I have began to develop an air hockey game...
If you want to test it you can download it from http://bilowlex69.free.fr/Air_Hockey_D2.CAB
This is only a beta version for the moment because there is only multiplayer functions.

NETCF GetTextExtentExPointW missing

Hi to all Guys,
I Was developing a custom textbox and I had the necessity to measure the string's width, so I try to define GetTextExtentPoint32 for NETCF, but I didn't find it.
After investigating on Google I found that on NETCF the right function would be GetTextExtentExPointW.
Some people say GetTextExtentExPoint some say GetTextExtentExPoint , others say GetTextExtentPointW. I Tried all these names without results and when I launch the program on the device I get err message "NotSupportedException".
Now my current try is :
[DllImport("coredll.dll")] static public extern int GetTextExtentExPointW(IntPtr DC, string Str, int Len, int nMaxExtent, ref int[] lpnFit, int[] alpDx, out SIZE size);
Could any one say what is the right name if one is there ? My device is acer neo S200 with WM6.5 but NETCF 2.0 SP2.
Could also anyone say how to get a list of the coredll.dll functions. Stated that I use sharpdevelop 2.2.1and not VS.
Thanks to all
Joss

How to open camera using vsiual studio 2008 in accer F900 windows mobile 6.1

Dear All i write an application in visula studio 2008 for opening mobile camera by clicking on a button on my windows forms.This code is working fine with HTC mobile ,but not working with accer F 900 mobile 6.1 CE os 5.2.20961(Build 20961.1.5.1
Code which i written is as below
Imports Microsoft.WindowsMobile.Forms
on button _clink below code is written.
Code:
Try
Dim ccd As New CameraCaptureDialog
ccd.Resolution = New Size(100, 200)
ccd.Mode = CameraCaptureMode.Still
ccd.ShowDialog()
If ccd.FileName <> String.Empty Then
PictureBox1.Image = New Bitmap(ccd.FileName)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Mod edit: Please remember to wrap any code in CODE tags and use proper indentation to make code easier to read

Categories

Resources