Archive for the ‘C#’ Category

28
gen

Hi all,
a large collection of tricks that you made with registry edit in your Windows Phone 7.
These are all hidden features, but simply editable from the registry directly from phone.

If you don’t have a unlocked phone with registry editor, read this article.
After that, read this one to read / write registry in WP7.
Rif: albertopasca.it

Here we goooooo:

Prevent Relock for ChevronWP7 unlocked device

1
2
3
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
    "PortalUrlProd"=""
    "PortalUrlInt"=""

OR

1
2
3
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
"PortalUrlProd"="127.0.0.1"
"PortalUrlInt"="127.0.0.1"

Enable Wifi 11n

1
2
[HKEY_LOCAL_MACHINE\Comm\BCMSDDHD1\Parms]
    "11nModeDisable"=dword:0

Caller ID issue fix

1
2
[HKEY_CURRENT_USER\ControlPanel\Phone]
"CallIDMatch"=dword:7

Live ID Activation Code
(Usefull on HD2 to bypass boring serial number step)

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\GwpCPC]
  "ActivationCode"="R****-H****-I****-*7***-**8**"

Developer Unlock State

1
2
[HKEY_LOCAL_MACHINE\Comm\Security\LVMod]
    "DeveloperUnlockState"=dword:1





Unlock Hidden option in ease of access settings

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\Accessibility]
    "CompactMode"=dword:0
    "TTY"=dword:1
    "telecoil_UI"=dword:1
    "telecoil"=dword:1

Set AutoData

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\AutoDataConfig]
"RunADC"=dword:1
"ConfigurationStatus"=dword:0
"Attempt"=dword:0
"MaxAttemptsAllowed"=dword:3

Show 3G Toogle

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Connectivity\CellularCPL]
 "Show3GToggle"=dword:1

Add “never” option to Lockscreen screen time-out

1
2
[HKEY_LOCAL_MACHINE\ControlPanel\Lock]
"DisableNever"=dword:0

Rif: albertopasca.it

Disable System Logs for best performance (usefull on HD2)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Application]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Security]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\System]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-CellularLogPublisher-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Dtpt-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-FacebookStatusEvent-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Mtp-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SharePoint-Notification-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-ShortMsgEtw-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SNTransports-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Commsync-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SyncStatusEvent-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\EventLog\Channel\Microsoft-WindowsMobile-TelShell-ShellHistoryChannel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-UnifiedStorePublisher-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-RilDrvLogChannel-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-ZTraceChannel]
"DefaultEnable"=dword:00000000

Cleartype settings

1
2
3
4
5
6
[HKEY_LOCAL_MACHINE\System\GDI\ClearTypeSettings\0409]
"ForceOff"=dword:1
"Enabled"=dword:0
"Quality"=dword:0
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\0409]
"ClearTypeText"=dword:1

System & Home Background color to grey (replace dark theme background color)

1
2
3
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1]
    "PageBackgroundColor"="#FF818181"
    "SysTrayBackgroundColor"="#FF818181"


keypad,keyboard background & menu color black (Restart needed to apply)

1
2
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1]
 "ChromeColor" value="#FF000000"

Famous on WM6 glyph cache entry

1
2
[HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE\0409]
    "limit"=dword:4000

Notification & sound volume

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[HKEY_CURRENT_USER\ControlPanel\Notifications\Vibrate]
"Enabled"=dword:0
[HKEY_CURRENT_USER\ControlPanel\Notifications\Message]
"Enabled"=dword:1
[HKEY_CURRENT_USER\ControlPanel\Notifications\Led]
"Enabled"=dword:1
"TimeOut"=dword:1e
[HKEY_CURRENT_USER\ControlPanel\Notifications\Sounds]
"Enabled"=dword:1
"Repeat"=dword:0
"Wave"="Alarm1"
[HKEY_CURRENT_USER\ControlPanel\Notifications\Default]
"LedRefCount"=dword:0
[HKEY_LOCAL_MACHINE\ControlPanel\Volume]
[HKEY_CURRENT_USER\ControlPanel\Volume]
"Key"=dword:2
"Screen"=dword:2
"Mute"=dword:7
"Volume"=dword:C666C666
"MaxSystemUIVolume"=dword:1E
"MaxInCallUIVolume"=dword:A
"MaxdBAtten"=dword:2D
"MinInCallVolume"=dword:1111

Unlock Hidden option in ease of access settings

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\Accessibility]
    "CompactMode"=dword:0
    "TTY"=dword:1
    "telecoil_UI"=dword:1
    "telecoil"=dword:1





Change default IE search engine
BING

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Bing"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Bing]
"URL"="http://m.bing.com/search/search.aspx?mid=8015&LC=en-us"

GOOGLE

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Google"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Google]
"URL"="http://www.google.com/m?hl=en&gl=us&client=ms-hms-tmobile-us&q={searchTerms}"

YAHOO

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Yahoo"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Yahoo]
"URL"="http://de.search.yahoo.com/search?p={searchTerms}"

Add url to IE new Tabs

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\AboutURLs]
"tabs"="http://www.albertopasca.it"

Rif: albertopasca.it

ACCENT COLOR NAMES

1
2
3
4
5
6
7
8
9
10
11
12
13
HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisp layName\0409]
"0"="Green" ;
"1"="Red" ;
"2"="Blue" ;
"3"="Orange" ;
"5"="Pink" ;
"6"="Brown" ;
"7"="Lime" ;
"8"="Teal" ;
"9"="Purple" ;
"10"="Magenta" ;
"11" = "Light blue";
"12" = "Dark blue";


LIGHT

1
2
3
4
5
6
7
8
9
10
11
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"0"=dword:FF339933
"1"=dword:FFE51400
"2"=dword:FF1BA1E2
"3"=dword:FFF09609
"5"=dword:FFE671B8
"6"=dword:FFA05000
"7"=dword:FF8CBF26
"8"=dword:FF00ABA9
"9"=dword:FFA200FF
"10"=dword:FFFF0097

DARK

1
2
3
4
5
6
7
8
9
10
11
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"0"=dword:FF339933
"1"=dword:FFE51400
"2"=dword:FF1BA1E2
"3"=dword:FFF09609
"5"=dword:FFE671B8
"6"=dword:FFA05000
"7"=dword:FF8CBF26
"8"=dword:FF00ABA9
"9"=dword:FFA200FF
"10"=dword:FFFF0097

ADD MORE COLORS

1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName\0409]
"13"="Grey"
"14"="Light grey"
"15"="Black"
"16"="White"
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName\0c0a]
"13"="Gris"
"14"="Gris claro"
"15"="Negro"
"16"="Blanco"
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"13"=dword:FF808080
"14"=dword:FFC0C0C0
"15"=dword:FF000000
"16"=dword:FFFFFFFF
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"13"=dword:FF808080
"14"=dword:FFC0C0C0
"15"=dword:FF000000
"16"=dword:FFFFFFFF


ADD MORE THAN 10 UNSIGNED APPS

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\Install]
    "MaxUnsignedApp"=dword:7fffffff ; Allow max number of unsignd apps

VARIOUS

1
2
[HKEY_LOCAL_MACHINE\Software\Qualcomm\QosLib]
  "Enabled"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Camera\Settings]
  "ScreenOrientation"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\Qualcomm\RIL\Options]
  "ExtendedSSInfo"=dword:0
1
2
3
4
5
6
[HKEY_LOCAL_MACHINE\Software\Microsoft\Connectivity\CellularCPL]
  "MakeDataConnectionExclusive"=dword:1
  "Show3GToggle"=dword:1
  "AutoNetwork"=dword:1
  "Roaming"=dword:0
  "CellDataOn"=dword:1
1
2
3
[HKEY_CURRENT_USER\ControlPanel\PhoneNetSelMode]
  "AlwaysShowGSMOperationModes"=dword:1
  "Option"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\HTC\Proximity]
  "ProximityDetectStatus"=dword:0

NEVER LOCK SCREEN

1
2
    [HKEY_LOCAL_MACHINE\ControlPanel\Lock]
    "DisableNever"=dword:0

Enjoy as usual and be carefully!!!

Snippet from the web.

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , , , ,

27
gen

Hi all,
you want change bing homepage from Internet Explorer?

IE


Here a simple tricks without unlocking your phone!

The string to edit is here in regedit:

1
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\AboutURLs

and the key is edit is “tabs“.

But… how to change Regedit string in Windows Phone 7 ???
First of all, read this post (how to enable MGF menu).





Next, open MGF, set the password like the previous link and go to:
-> Engineer Menu
-> Other Settings
-> Edit Registry

Select HKEY_LOCAL_MACHINE.
On next textfield type correctly: “Software\Microsoft\Internet Explorer\AboutURLs
Next one write “tabs” – STRING
On the last one, in “Input Data“, type your home page like “http://www.albertopasca.it

Before click SET, please click QUERY to verify that is all correct.
At the bottom you can view registry current key.

If you wrongly type strings, you could damage phone registry and could be necessary an HARD RESET! Be carefully!

Once your setting are ok, click SET and restart your phone!
Now, when you open Internet Explorer without any tabs, you see your custom homepage.

Default tabs value is “res://ieframe.dll/tabswelcome.htm”.

This settings was applied successfully on LG OPTIMUS 7, my phone.

enjoy!

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , ,

27
gen

Today a phone code to enable in your apps list a new tool, MFG!


Open telephone and call ##634#.
After that, in your app list you can view MFG.




MFG use a password to enter in secret menù. Type 277634#*# and click ENTER.


Once opened you can set/view/edit a lot of phone functions, like regedit!

1 Device test
2 ELT mode
3 sw Sanity test
4 factory reset
5 version
6 call ui display
7 engineer menu
8 Folder tester
9 IRT test

enjoy and be carefull!!!

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , ,

20
nov

Eh si,
anche il mio nuovissimo Windows Phone 7 fa di tutto per essere ritrovato!!!
E’ un LG Optimus 7 – E900 !





Chiama il telefono dal pc

Tramite l’account di Windows Live, è possibile sapere:

Trova
Vedi la posizione indicativa del telefono su una mappa.

Chiama il telefono dal pc

Fai squillare
Fai squillare il telefono con una suoneria speciale per 1 minuto, anche se il telefono è in vibrazione o silenzioso.

Per i curiosi, questa è la suoneria che viene sparata a palla sul telefono!

AUDIO

Blocca
Blocca il telefono e nessun altro potrà usarlo. Puoi anche scrivere un messaggio da visualizzare sullo schermo con le istruzioni per restituirlo.

Chiama il telefono dal pc

Cancella
Rimuovi tutti i dati dal telefono e ripristina le impostazioni di fabbrica.

Trova il telefono





Altro? hehe


albertopasca.it

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , ,

14
nov

How to send a custom email from Windows Phone 7 with default configured client?

1
2
3
4
5
EmailComposeTask mail = new EmailComposeTask();
mail.To = "info@albertopasca.it";
mail.Subject = "info from app";
mail.Body = "message...";
mail.Show();





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , ,

14
nov

How to call Internet Explorer to open a custom url!

1
2
3
WebBrowserTask ie = new WebBrowserTask();
ie.URL = "http://www.albertopasca.it";
ie.Show();





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , ,

14
nov

This is my first post about Windows Phone 7 SDK!

It’s a C# snipplet to make call from your phone using PhoneCallTask!

1
2
3
4
PhoneCallTask pct = new PhoneCallTask();
pct.DisplayName = "Alberto Pasca";
pct.PhoneNumber = "+39328111111";
pct.Show();


Windows Phone 7 Make Call

stay tuned!





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , ,

17
ott

Bene,
come al solito Microsoft non si tira indietro e presenta il nuovo SDK per Windows Phone 7 e XBOX 360!

Provato subito in anteprima!

Si presenta così il nuovo emulatore Microsoft. Un interfaccia completamente diversa dai soliti copia/incolla (Android, iPhone, Symbian) esistenti.

Windows Phone 7
Windows Phone 7




Ovviamente è stata creata subito la prima APP inutile, ma funzionante!

Windows Phone 7

Funzionamento dell’sdk abbastanza semplice.
Integrato in Visual Studio 2010, contiene i classici elementi da trascinare, proprietà, debug e via dicendo.
Usa XAML e C#.

La licenza per lo sviluppatore costa 99€ ed è valida un anno.

Rif: albertopasca.it

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , ,

21
lug

Well,

a usefully thing (for me) that convert real media files like CAMV, RM, SMIL in iPod compatible video (AVI mpeg4).

It’s a multithread windows executable easy to use.

It merge RM and CAMV in AVI file and after convert the AVI in Mpeg4 for iPod compatible video in 320×240.

Rcam

you can download it here.

    - Requires Framework .net 2.0+. It’s a C# application.
    - Unzip all and click Rcam.exe. Mantain mencoder.exe and ffmpeg.exe in the same path of your executable.

If you prefer unix version of rm camv converter, read this old article.

WARNING! It’s a beta version 000000.000001 ! There are a lot of bugs… but it works!

it’s all.

Rif: albertopasca.it

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , , , , , , ,

13
lug

Yes!
It’s double right click!

In this snippet you can use right double click to “go back” on your web browser!
It’s a stupid tricks, but it’s very useful!

Here we go!

As usually, copy and paste this snippet in your windows application.

First of all, you must include this libs:

using System.Runtime.InteropServices;
using System.Diagnostics;





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
private static LowLevelMouseProc _proc = HookCallback;
private static IntPtr _hookID = IntPtr.Zero;
private static MSLLHOOKSTRUCT _posDblClk;

private const int WH_MOUSE_LL = 14;

private enum MouseMessages
{
  WM_LBUTTONDOWN = 0x0201,
  WM_LBUTTONUP = 0x0202,
  WM_MOUSEMOVE = 0x0200,
  WM_MOUSEWHEEL = 0x020A,
  WM_RBUTTONDOWN = 0x0204,
  WM_RBUTTONUP = 0x0205
}

[StructLayout( LayoutKind.Sequential )]
private struct POINT
{
  public int x;
  public int y;
}

[StructLayout( LayoutKind.Sequential )]
private struct MSLLHOOKSTRUCT
{
  public POINT pt;
  public uint mouseData;
  public uint flags;
  public uint time;
  public IntPtr dwExtraInfo;
}

[DllImport( "user32.dll", CharSet = CharSet.Auto, SetLastError = true )]
private static extern IntPtr SetWindowsHookEx( int idHook, LowLevelMouseProc lpfn, IntPtr hMod, uint dwThreadId );

[DllImport( "user32.dll", CharSet = CharSet.Auto, SetLastError = true )]
[return: MarshalAs( UnmanagedType.Bool )]
private static extern bool UnhookWindowsHookEx( IntPtr hhk );

[DllImport( "user32.dll", CharSet = CharSet.Auto, SetLastError = true )]
private static extern IntPtr CallNextHookEx( IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam );

[DllImport( "kernel32.dll", CharSet = CharSet.Auto, SetLastError = true )]
private static extern IntPtr GetModuleHandle( string lpModuleName );

Ok, this is first part of code, used to catch mouse event with windows API like kernel32.dll and user32.dll.

After that, create two simple method that invoke mouse hook:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
private static IntPtr SetHook( LowLevelMouseProc proc )
{
  using ( Process curProcess = Process.GetCurrentProcess() )
  using ( ProcessModule curModule = curProcess.MainModule ) {
    return SetWindowsHookEx( WH_MOUSE_LL, proc, GetModuleHandle( curModule.ModuleName ), 0 );
  }
}

private delegate IntPtr LowLevelMouseProc( int nCode, IntPtr wParam, IntPtr lParam );

private static IntPtr HookCallback( int nCode, IntPtr wParam, IntPtr lParam )
{
  if ( nCode >= 0 && MouseMessages.WM_RBUTTONDOWN == ( MouseMessages )wParam ) {
    MSLLHOOKSTRUCT hookStruct = ( MSLLHOOKSTRUCT )Marshal.PtrToStructure( lParam, typeof( MSLLHOOKSTRUCT ) );

    if ( ( _posDblClk.pt.x == hookStruct.pt.x ) && ( _posDblClk.pt.y == hookStruct.pt.y ) ) {
      SendKeys.Send( "%{LEFT}" );
    }
    _posDblClk.pt.x = hookStruct.pt.x;
    _posDblClk.pt.y = hookStruct.pt.y;
  }

  return CallNextHookEx( _hookID, nCode, wParam, lParam );
}

…you can view that in HookCallback function there is a method that use “%{LEFT}”, this is equivalent to ALT+LEFTARROW, used to go back in web browser.

SendKeys.Send( “%{LEFT}” );

When is detected a double right click, the program send to the system the ALT+LEFTARROW keys. If you are in a browser, you go back!

Finally,
in you form init, insert this lines

1
2
3
_hookID = SetHook( _proc );
Application.Run();
UnhookWindowsHookEx( _hookID );

that starting the mouse hook.

Perfect! Compile and test it!

If you like this tricks, add it in Windows Autorun!
If you like this post, click iLike!
If you don’t want to compile and want only to use it, you can download from here.




byz

Rif: albertopasca.it

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , , , ,

Switch to our mobile site