|
In a VB.NET application I have changed the roaming property of an user setting from false to true.
If I run the application the setting is now written (through my.settings.save) to the roaming user.config, but if I restart the application the setting is still being read from the local user.config !
Only if I delete the entry (manually) from the local user.config, then the setting is being read from the roaming user.config.
Somewhere in MSDN I read that if there were duplicate settings in local and roaming, the roaming one should override the local; in my case this seems only true for the writing of the setting.
Is this "bug" Microsoft's or mine ?
|
|
|
|
|
I'm looking for an example of how to obtain the two colors used in the gradient to the left (where the icons are) in the .NET style menus. I've tried to figure this out using the APIs for uxtheme.dll, but as I'm quite new to this it doesn't make much sense to me.
|
|
|
|
|
.NET menus are slightly different than standard operating system menus. The paint routines can be handled by the operating system or by the application itself. As for custom painting and determining menu renderers for menus, please look at my article: Custom ToolStrip Renderers[^]. As for uxtheme.dll ThemeAPI manipulation, please look into my other article: Adding Transparent Menus and Custom Titlebar Buttons to your Applications[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi
What is the equivalent of the following code in vb.net. If you give me a push, I would really appreciate it.
internal static class NativeMethods
{
[DllImport("coredll.dll")]
public static extern uint SendMessage(IntPtr hwnd, uint msg, uint wparam, uint lparam);
}
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
First that looks like C# code and not C code
Second there are alot of free convertors on the net
http://www.developerfusion.com/tools/convert/csharp-to-vb/[^]
is one of them
And this is what you get if you use that one:
Friend Module NativeMethods
Private Sub New()
End Sub
<dllimport("coredll.dll")> _
Public Function SendMessage(ByVal hwnd As IntPtr, ByVal msg As UInteger, _
ByVal wparam As UInteger, ByVal lparam As UInteger) As UInteger
End Function
End Module
|
|
|
|
|
|
Are saying abt Module???
1.You can use global variable then u can retrieve the value
2.return the value from module function or sub.
|
|
|
|
|
I want use properties or global variables, but i don't understand how i do
Dim s as String
if ModalForm.ShowDialog=mrOk then
p=ModalForm.property_name
end if
Please,give me sample
|
|
|
|
|
actually I m not understand problem
1. what is P. is it integer variable or a control or something else
2. Why are using s.
This is my guess try it.
p=ModalForm.property_name
p contain an integer value. if want know that value use msgbox and check it.
If u want use outside other function the p variable make it as public. or give public variable scope. then u can use.
Until ur giving clear view of ur problem i can't give solution.
|
|
|
|
|
1. what is P. is it integer variable or a control or something else
Dim p as String
|
|
|
|
|
If you don't know anything, don't try to help people, it just confuses them.
A modal form is one that takes over the focus for the app, as in when you call ShowDialog
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thanx's I don't know this concept. I wil learn I m new to vb.net just 2 months is over plzzz sorry for wrong ans.
|
|
|
|
|
All you have to do is expose the return values as public properties on your modal Form. Set those properties when the user clicks on the OK button.
When control passes back to the code that shown the form, you just pickup the values from those properties.
|
|
|
|
|
Ditto. Creating global variables for items you want to share is silly when you should be using properties.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I use a Third party tool name (boxi) to design in that the status strip dock the bottom but then the child form are not open the proper location so what to do i please help me
|
|
|
|
|
Not sure what you are asking, but if you are having problems with 3rd party control, your best option would be to refer the problem to the author/publisher of the control.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Hello friends,
How to get files inside subfolder.
this is the code i used to get files inside a folder, How can i use this code to get the file inside the folder or subfolders.
these code wil consider the files inside folder only.
sPath1 = "C:\common share\"
sFileNm = Dir(sPath1, vbNormal) 'Get the first file from the specified directory
For Each sFileNm1 In objFolder1.Files
'If the file has a txt extension then print the file name
If Right(sFileNm, 3) = "txt" Then
Debug.print sFileNm1
End If
sFileNm = Dir
Next
"C:\common share\ " May or maynot contains subfolder, if present want to check the subfolder also. Can i get the code for these.
Thanks and regards
Jishith
|
|
|
|
|
One way is recursion. A quick google will provide you with many examples.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi,
Whenever am trying to run the following query
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\Documents and Settings\sbritto\Desktop\testing.xls;','SELECT * FROM [Sheet1$]') select * from sqlserver
am getting an "Reported error".
Here am trying to export the data from sqlserver to an existing excel.
What's wrong in this Query. Please help me out
Thanks in Advance
Regards,
Samson
|
|
|
|
|
You didn't specify any column names. The format for an SQL INSERT statement is:
INSERT INTO table (column1, column2, ...)
VALUES (value1, value2, ...)
Also, it would appear that you need to get a recordset from the Excel sheet, append the SQL Server rows to it, then write the recordset back to the Excel sheet. This would be 3 operations instead of just the one.
|
|
|
|
|
I'm suing Vb2005.
I looked to the Communication >> Hyper Terminal >> Connect to on PC , and found that it using the modem to call Phone number(not mobile). so I inserted the name of modem in the : mdPhone.Port , But didn't succeed.
Imports ATSMS
Dim mdPhone As New GSMModem
mdPhone.Port = "I entere the name of modem"
txtPhoneNumber.Text = mdPhone.MSISDN
Bu the way.the information of modems is from properties of pC
I'm using Modems and the port is COM3.
modified on Tuesday, December 16, 2008 12:16 AM
|
|
|
|
|
By "name of modem", did you mean the actual name of the modem, or COM3? Also, is anything else open that is already using that COM port, like HyperTerminal? Only one app can access the COM port at a time.
|
|
|
|
|
I tried both of them the the actual name of the modem and the com3
and I tried them with this code too, but didn't succeed.
Dim mdPhone As New Modem<br />
mdPhone.Port = " the actual name of the modem or Com3" <br />
txtPhoneNumber.Text = mdPhone.Port
|
|
|
|
|
I have no idea then. I haven't used the library you're using at all. Perhaps talking to the people who wrote it may help.
|
|
|
|
|
do you have another idea can help?
|
|
|
|