|
I'm trying to invoke a method of a web service which is running with the basic authentication. I'm using MS Soap Toolkit 3.0's low level API's to invoke a web service method. Following code is used to set the authentication details..Connector.Property("AuthUser") = "userid" and Connector.Property("AuthPassword") = "pwd"..but I'm receiving an error always.
here's the error message
Error 401--Unauthorized xxx
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.2 401 Unauthorized
If anyone has encountered this type of problem before and got solution for this problem, please let me know immediately.
Thanks for any help offered,
Praveen
|
|
|
|
|
I am using the SendMessage API to read text from a textbox in a third party application.
I am calling it using the following command:
Win32API.SendMessage(hwnd, WM_GETTEXT, textlength, mymessage)
where hwnd is an Int32 representing the textbox handle;
WM_GETTEXT is a constant
textlength is the number of characters to be retrieved; and
mymessage is the string to store the info.
Everything seems OK apart from the fact that when I try and display the string it simply appears as a series of blobs.....not readable text (see below).
片敡敭丠睥慭敔瑳倠条eಇ䐁
This is my first foray into the world of Win32 APIs and VB.Net so your help would be much appreciated.
|
|
|
|
|
I have build a windows services. The windows service are controlled by 'n windows application. The problem: When I start the windows service form the windows application the application timed Out.
Service cannot be started. System.Net.WebException: The operation has timed-out.
at KITSync.KITSync.serviceStart()
at KITSync.KITSync.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
If I start the windows services manually the program runs smoothly. The problem only occurs after installation not in the development environment.
Please help me!
Thanks Regardt
|
|
|
|
|
Hi
I have a large project which refers to a number of dll's. These dll's are in small projects which I often go back to and change from Debug to Release and then rebuild them.
The main project is also often switched from Debug to Release.
What I'm now finding is that if I press F5 from the IDE (either in Debug or Release), even though the Output window says its building the project, any changes I've made to the main project are not reflected in this build.
However, if I select from the menu, Build and then press F5 the new build is fine.
I've tried deleting all *.dll;*.exe;*.pdb but this seems to help for a couple of hours, and then it goes back to its old behaviour.
Has anyone else experienced this ?
TIA
Jeremy
|
|
|
|
|
Does the same problem occur if you Build >> Rebuild Solution instead of just using F5?
This seemed to solve our issue.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photo
|
|
|
|
|
Simon
Yes it still happens with Rebuild Solution - note its one of these intermittent problems, sometimes happens sometimes doesn't. I've just got into the habit of doing a build before a run - but its still very irritating.
Regards
Jeremy
|
|
|
|
|
Wonder if there is a way to create a windows form notification/alert to inform the user when there is an update made to microsoft Sql Server database?
|
|
|
|
|
How can i change the font, forecolor,caption and ...
in then msgbox function of vb6.
please answer me?????
MkhProgrammer
|
|
|
|
|
The easiest way(maybe the only one) is to make your own MsgBox !!
Create a with label to hold the text and put buttons (OK,Cancel,etc..) and make them visible/invisible according to parameters passed.
|
|
|
|
|
The short answer is you can't! The long answer is to write your own MsgBox function.
RageInTheMachine9532
|
|
|
|
|
i want suggestions for my major project which i have to make in my 4th year of engineering.
I will be very grateful if u can suggest something which is very good and a good learning experience.
PLEASE HELP!!!
Every problem has a solution!
|
|
|
|
|
Hello all..
How to get the icon that is associate with the file?
I have email item... which contain file attachments..
So first get the file attachment using mail.Attachments and mail.Attachment. Up to here no problem..
here the code to get the icon and saving it in C:\PCKM so I can call the image file from HTML code
<br />
Function GetIconLocation(ByVal filename As String) As String<br />
Dim loc As String<br />
'Use this to get the small icon.<br />
Dim fName As String 'The file name to get the icon from.<br />
Dim shinfo As SHFILEINFO<br />
shinfo = New SHFILEINFO<br />
Dim openFileDialog1 As OpenFileDialog<br />
openFileDialog1 = New OpenFileDialog<br />
Dim hImgSmall As IntPtr 'The handle to the system image list.<br />
<br />
hImgSmall = SHGetFileInfo(filename, 0, shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON Or SHGFI_SMALLICON)<br />
Dim hIcon As Icon<br />
hIcon = Icon.FromHandle(shinfo.hIcon)<br />
<br />
Dim bip As System.Drawing.Bitmap<br />
bip = hIcon.ToBitmap()<br />
bip.Save("c:\pckm\icon.bmp")<br />
loc = "<img src=""c:\pckm\icon.bmp""><br>" & filename<br />
<br />
GetIconLocation = loc<br />
End Function<br />
After I saved the icon.bmp I try to open it by double clicking the file or using open with to oen the file but can't open with any other programs
How to save the icon to the hard drive???
Thank you
|
|
|
|
|
Hello.. all
I used outlook to get the messages (mailItem) and then get the file attachments by calling
mailItem.attachments.attachment
So far no problem.. I got the attachment file name. still no error..
Here the problem come..
how to get the attachment icon?? I used the following code (SHGetFileInfo) to get the file attachment icon location
so I can print the file attachment name with its associate icon on the paper ( same as printing from the printer) using HTML Code
for example:
str = "<img src=""c:\this\is\icon\location\attachmentIcon.ico""><br>"_<br />
& aAttachment.Name
here is my code to get the icon location... This code doesn't work as I want ( I want to get the directory of the image of icon or attachment icon and put it in the html code)
<br />
Dim loc As String<br />
'Use this to get the small icon.<br />
Dim fName As String 'The file name to get the icon from.<br />
Dim shinfo As SHFILEINFO<br />
shinfo = New SHFILEINFO<br />
Dim openFileDialog1 As OpenFileDialog<br />
openFileDialog1 = New OpenFileDialog<br />
<br />
Dim hImgSmall As IntPtr 'The handle to the system image list.<br />
<br />
hImgSmall = SHGetFileInfo(aAttachment.Name, 0, shinfo, Marshal.SizeOf(shinfo), _<br />
SHGFI_ICON Or SHGFI_SMALLICON)<br />
<br />
<br />
loc = "<img src=""" & shinfo.szDisplayName & """><br>" & filename<br />
Thank You
|
|
|
|
|
How do i write a program that it use randomize to generate 2 postives number and sum them up. There are four choices for user to choose, this four choices are also generate from randomize. Question and answer generated should be between 1 to 100.
|
|
|
|
|
Random r = new Random(DateTime.Now.Second); //initalize the generator
//generate two integers between 1 and 50
int number1 = r.Next(49)+1;
int number2 = r.Next(50);
//sum up the numbers - result cannot be <1 or >100
int sum = number1 + number 2;
//generate more numbers...
What do you need this for, is it homework?
|
|
|
|
|
Sorry, I posted that in C#. Here is VB:
Randomize (Timer)
Dim number1, number2, sum As Integer
number1 = (Rnd() * 49) + 1
number2 = (Rnd() * 49) + 1
sum = number1 + number
|
|
|
|
|
I just started learning the vb.net and I would like to know how can I check if a subkey exists in the registry and use a code to create the subkey it if does not exist in the registry.
All help will be welcome.
Thank you,
Simon
|
|
|
|
|
There is an example of this very topic on the samples for VB.NET:
Private Sub DoesKeyExist
Dim regVersion As Microsoft.Win32.RegistryKey
regVersion = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\TestApp\\1.0", True)
If regVersion Is Nothing Then
regVersion = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\TestApp\\1.0")
End If
End Sub
This will check to see if a key exists, then if not, creates it.
Oh yeah! It also needs a reference to the Win32 namespace.
RageInTheMachine9532
|
|
|
|
|
I am using VB.net I am looking for a way to export a registry key like
HKLM\System\CCS\Control\Services (the whole key and all subkeys).
I would like to use the same methods that Regedit uses.
BTW: I am connecting to a remote machine's registry.
Question #2.
How do I determin the data type of a registry key. I understand how to read the value name and value but not the data type.
Example.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update
Value: AUState
Data Type: Reg_Dword <----This is what I am looking to discover.
Data: 2
Louis
|
|
|
|
|
wobblervb wrote:
I am using VB.net I am looking for a way to export a registry key like
HKLM\System\CCS\Control\Services (the whole key and all subkeys).
I would like to use the same methods that Regedit uses.
It looks like RegEdit has its own enumerator built in. There is no function in the .NET framework that does the exact samething, so it looks like your going to have to write your own exporter.
wobblervb wrote:
How do I determin the data type of a registry key. I understand how to read the value name and value but not the data type.
The .NET framework doesn't offer a function to do what your want. Your probably going to have to write a C++ component to return that info.
RageInTheMachine9532
|
|
|
|
|
I want to use SendMessage to send a WM_UPDATEUISTATE message that I hope will show the focus rectangle on option buttons but I cannot find the constant values for the expected wParam values: UIS_CLEAR, UIS_INITIALIZE, UIS_SET, UISF_HIDEACCEL, UISF_HIDEFOCUS, UISF_ACTIVE.
I know that I can change a setting in the Control Panel (Display - Appearance - Effects) but I want to be able to control this programmatically.
Any ideas?
|
|
|
|
|
If I read this right, you just want to move the input focus to a button control. In VB.NET, that's easy:
controlName.Focus()
will set the focus to that control. BUT!! (There's always one of these!)
Long version:
A control cannot receive focus unless it is enabled, is visible, AND HAS A WINDOW HANDLE ASSIGNED TO IT! What this means is, you can only set the focus to the control AFTER it has actually been created and it's Message Loop is up and running.
Short version:
If you try and set the focus to a control in a Form's Load event, you must first Show() the form, THEN set the focus to the control. Otherwise it won't work.
RageInTheMachine9532
|
|
|
|
|
RageInTheMachine9532 wrote:
you just want to move the input focus to a button control
Thanks for the reply, but no. What I want to do is tell Windows to show a focus rectangle around the text of a button that has input focus. By default in XP it does not. Also, I am using VB6, not .Net.
If you search MSDN for the WM_CHANGEUISTATE Message you'll see exactly what I'm talking about.
On the other hand, if you have .Net and you search your local help file for the UIS_ and UISF_ constants specified in this tread's header, might you be able to tell me the numeric value of these constants?
For example, I know that...
WM_CHANGEUISTATE = 295 (H&0127)
WM_UPDATEUISTATE = 296 (H&0128)
WM_QUERYUISTATE = 297 (H&0129)
...but I do not know the value for these other constants and they are not known by VB6 because it pre-dates their use in the operating system (beginning with Win2000).
|
|
|
|
|
OK. I think I understand what your trying to do now.
I found the constants in WinUser.h in the VC98\Include folder. Here is the copy/paste:
#define UIS_SET 1
#define UIS_CLEAR 2
#define UIS_INITIALIZE 3
#define UISF_HIDEFOCUS 0x1
#define UISF_HIDEACCEL 0x2
#if(_WIN32_WINNT >= 0x0501)
#define UISF_ACTIVE 0x4
#endif /* _WIN32_WINNT >= 0x0501 */
#endif /* _WIN32_WINNT >= 0x0500 */
#endif
RageInTheMachine9532
|
|
|
|
|
Rage,
Thanks a bunch. That is exactly what I was looking for. Unfortunately, my winuser.h file does NOT include these constants and frankly I don't know why (VB6 Enterprise).
I'll track that issue down next.
|
|
|
|