|
If your code is well written, you should be able to just write an ASP.NET presentation layer, but as has been said, it's a totally different model, and the way you code it is way too different for a wizard to deal with.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a windows apllication which has flexgrid.This application works fine when it is run from the local hard disk.But when this application is accessed from another computerin the network it gives.System.security.securityexception
Using try catch i found the error was Request failed
What i actually want is deploy my application on one machine and acces it from other machines without deploying on each and every machine
smita
|
|
|
|
|
Why does the flexgrid give a security exception ? Is the error message wrong, and you just need to deploy the grid ? ( Flexgrid isn't a WinForms control, it's an old one, isn't it ? )
smita_roy@insuranceassist.co.in wrote:
What i actually want is deploy my application on one machine and acces it from other machines without deploying on each and every machine
You really can't do that with the presentation part of the code, although you can do it with your data stuff, if you can configure all instances of the app to look to your machine. This means you need to code for concurrency issues, obviously.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I have given an option of deleting a row of a grid by pressing Ctrl-F6
But this key is not working
The same function is getting called by other keys like Ctrl-F7
Since Ctrl-F6 is a windows shortcut key to toggle through windows,so how to disable this key of windows.
Please get me a solution
Thanks in advance
|
|
|
|
|
I am trying to use the ms internet transfer control to download binary files from the internet using the execute statement. I am only using a very basic piece of code as a test, however by using the debugging tools, and stepping through the code one line at a time, the Inet controls statechanged event is not called. The execute statement is
Inet1.Execute URLname, "GET"
I have tried setting the other properties of the inet control to no avail. In addition I thought about adding a piece of code either before or after the code to make sure the inet control is not currently executing, something like
If Inet1.StillExecuting = True then
DoEvents
End If
If anyone has any thoughts on what is going on I would be very appreciative,
Cheers,
Mark
|
|
|
|
|
hello everybody,
can anybody tell me is it possible to implement a peer to peer network between two pocket pc via Wi-Fi?
my meaning is can both of the pocket pc communicate with each other using Wi-Fi? such as IrDA or bluetooth, both pocket pc can send message to and receive message from another pocket pc..
if can, how to implementing it? is it need a server or access point?
|
|
|
|
|
I want (desperately) to do something very simple (i think or at least thought.)
I want to have a web page that simply has a link that you click, this runs a command line app and then returns the output to HTML.
{ie click here the and the system shows you the contents of C drive. Or shows you custom enviornmental settings.)
I just want command line interaction I do not want WMI workarounds (I figured how to do that on my own.)
I want to use VBscript... i know how I would do this if i could use Perl... the coding is not my actual issue, it is the nuances of VBscript and Command line interaction.. alas Perl does script to command line and back so much more smoothly than VBscript seems to but I am a newb with vb altogether...
Thanks very much for you time!
|
|
|
|
|
|
I have been trying to get this api to work in VB.NET, but have no clue how. I have the equivilent code in VB6, but can't get it converted to .NET. If anyone has an example, or know how to do this in VB.NET any help would be appreciated.
Enes M
|
|
|
|
|
Enes,
I am trying to do the exact same thing as yourself. I feel that I am close to a solution, it's just not 100% correct. I am trying to get NetSessionEnum working with level 2 or 502.
I get the data and correctly populate the structure with the first session's details, but when I go to populate subsequent sessions the data is being loaded into the wrong fields. My structure appears correct according to Microsoft's web-site.
If I get it working correctly I'll post the result, hopefully you can do the same if you beat me to the solution.
Regards,
Paul T.
|
|
|
|
|
Give this a try:
'Structures
'Requirements as of March 2005.
'Client : Windows XP, Windows 2000 Professional, or Windows NT Workstation.
'Server : Windows Server 2003, Windows 2000 Server, or Windows NT Server.
Private Structure SHARE_SESSION_VALUES_502
Dim strComputerName As String 'The name of the computer that established the session.
Dim strUserName As String 'The name of the user who established the session.
Dim strNum_Opens As String 'The number of files, devices, and pipes opened during the session.
Dim strTime As String 'The number of seconds the session has been active.
Dim strIdle_Time As String 'The number of seconds the session has been idle.
Dim strUser_Flags As String 'Describes how the user established the session.
Dim strClientType As String 'The type of client that established the session.
Dim strTransport As String 'The name of the transport that the client is using to communicate with the server.
End Structure
Private Structure SHARE_SESSION_INFO_502
Dim strComputerName As IntPtr
Dim strUserName As IntPtr
Dim strNum_Opens As IntPtr
Dim strTime As IntPtr
Dim strIdle_Time As IntPtr
Dim strUser_Flags As IntPtr
Dim strClientType As IntPtr
Dim strTransport As IntPtr
End Structure
'Constants
Private Const NERR_SUCCESS As Long = 0
Private Const ERROR_MORE_DATA As Long = 234
'Variables
Private m_colSessionDetails As New Collection
Private m_strComputer As String
Private m_lngSessionLevel As Long
Public Sub Initialise(ByVal p_strComputerName As String)
Dim lngLoop As Long
m_strComputer = p_strComputerName
' Connect to the remote computer
test(p_strComputerName)
End Sub
Private Sub test(ByVal p_strComputer As String)
Dim p_lngRtn As Long
Dim p_intptrBuffer As IntPtr
Dim p_lngPreMaxLen As Long
Dim p_lngEntriesRead As Long
Dim p_lngTotalEntries As Long
Dim p_lngResumeHwnd As Long
Dim p_intPtrNextBuffer As IntPtr
Dim p_strClientName As String
Dim p_strUserName As String
Dim Share_Struct_Size As Integer
Dim SI502_Pointers As SHARE_SESSION_INFO_502
Dim SI502_Values As SHARE_SESSION_VALUES_502
Const cnstProcName As String = "Test"
Try
Do While m_colSessionDetails.Count > 0
m_colSessionDetails.Remove(1)
Loop
p_strComputer = "\\" & p_strComputer
p_strClientName = ""
p_strUserName = ""
p_lngPreMaxLen = 0
p_lngResumeHwnd = 0
'Try the Win XP, 2000 Server and 2003 Server option first, if that fails - then try
'the option for Win Me, 98, and 95.
m_lngSessionLevel = 502
p_lngRtn = NetSessionEnum(p_strComputer, _
p_strClientName, _
p_strUserName, _
m_lngSessionLevel, _
p_intptrBuffer, _
p_lngPreMaxLen, _
p_lngEntriesRead, _
p_lngTotalEntries, _
p_lngResumeHwnd)
If p_lngRtn = NERR_SUCCESS Then
If p_lngRtn <> ERROR_MORE_DATA Then
Share_Struct_Size = Marshal.SizeOf(SI502_Values)
For i As Integer = 0 To p_lngEntriesRead - 1
p_intPtrNextBuffer = New IntPtr(p_intptrBuffer.ToInt32 + (Share_Struct_Size * i))
SI502_Pointers = Marshal.PtrToStructure(p_intPtrNextBuffer, GetType(SHARE_SESSION_INFO_502))
SI502_Values = New SHARE_SESSION_VALUES_502
SI502_Values.strComputerName = Marshal.PtrToStringUni(SI502_Pointers.strComputerName)
SI502_Values.strUserName = Marshal.PtrToStringUni(SI502_Pointers.strUserName)
SI502_Values.strNum_Opens = SI502_Pointers.strNum_Opens.ToInt32
SI502_Values.strTime = SI502_Pointers.strTime.ToInt32
SI502_Values.strIdle_Time = SI502_Pointers.strIdle_Time.ToInt32
SI502_Values.strUser_Flags = SI502_Pointers.strUser_Flags.ToInt32
SI502_Values.strClientType = Marshal.PtrToStringUni(SI502_Pointers.strClientType)
SI502_Values.strTransport = Marshal.PtrToStringUni(SI502_Pointers.strTransport)
m_colSessionDetails.Add(SI502_Values)
Next
End If
Else
'TODO - Enumerate Sessions using level 50.
m_lngSessionLevel = 50
End If
'Clean up the buffer
Call NetAPIBufferFree(p_intptrBuffer)
Call NetAPIBufferFree(p_intPtrNextBuffer)
Exit Sub
Catch e As Exception
Err.Raise(p_lngRtn, _
cnstProcName, _
e.Message)
End Try
End Sub
Regards,
Paul T.
|
|
|
|
|
Does the above work for you? Api function always returns a long number 267964182123512921, or some other number depending on whether i use local or remote computer. Do you have a fully working module or a class? I'm not too good with APIs, so I don't think i will be able to figure this out. You can drop me an e-mail at enes@qwest.net if the code is too long to post here.
Here is my API function decleration.
Private Declare Function NetSessionEnum Lib "netapi32.dll" (_
ByVal lptstr As String,_
ByVal lptstr As String,_
ByVal lptstr As String,_
ByVal dword As Long,_
ByVal pbyte As IntPtr,_
ByVal dword As Long,_
ByRef pdword As Long,_
ByRef pdword As Long,_
ByRef pdword As Long) As Long
Thanks,
Enes M.
|
|
|
|
|
Enes,
The code I submitted does work for me. I have run it from a Win XP machine and received the correct details of a Win 2003 Server. Be careful of the level that you use because some older OS's won't run level 502, in this case you have to use level 50 which has a different structure. My apologies for not including the API declaration originally.
Private Declare Unicode Function NetSessionEnum Lib "netapi32.dll" (_
ByVal ServerName As String, _
ByVal ClientName As String, _
ByVal UserName As String, _
ByVal Level As Integer, _
ByRef Buffer As IntPtr, _
ByRef prefmaxlen As Integer, _
ByRef entriesread As Integer, _
ByRef totalentries As Integer, _
ByRef ResumeHandle As Integer) As Integer
Regards,
Paul T.
|
|
|
|
|
I`m trying to get picture from text. I need this to log on to my game, anyone knows how to pull it off ?
image text: http://www.void.rs.ba/gra.jpg
so i need to extract "LeechTower" or any other text from it
|
|
|
|
|
You'll need to implement some kind of OCR. There is an article here on CP, just search for OCR. I hope you're familiar with neural networks...
There is a problem with your image though. The lines going through the text will make it virtually impossible for ANY OCR implementation to see the text. You'll have to preprocess the image to make the text standout against the background before you try an OCR pass.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
Iam doing one small project in VB.NET.In that i want to give the command in TEXTBOX and the output should be displayed in RICH TEXTBOX.I need the code for this synario.pls help me in this regard.....
|
|
|
|
|
This is nowhere near enough information to help you with anything. What command? What are you doing to generate output? What is the output supposed to look like? What is it that your application is supposed to do?
So far, all you've said is "I want to type a command in a Textbox, do some processing, and write some output to a RichTextBox." Easy, RichTextBox1.Text = "some output..."
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for replying to me.normaly if we want to know the ip address of our system we will give "ipconfig" command in the command prompt.and the system will give ipaddress as the output these output is seen in the console itself.in the same way....i want to give this command "ipconfig" in textbox and the ipaddress that we get as output should display in richtextbox...its not compulsory that i want to use textbox and only richtextbox......u can use any usercontrol as u like....
|
|
|
|
|
Do you mean something like:
Dim proc As Process
proc = New Process
proc.StartInfo.FileName = "ipconfig"
proc.StartInfo.UseShellExecute = False
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.CreateNoWindow = True
proc.Start()
Dim sr As IO.StreamReader = proc.StandardOutput
rtb.AppendText(sr.ReadToEnd)
sr.Close()
|
|
|
|
|
You should tell us more in details about ur project
handly will helps you so explain more clearly ur question
|
|
|
|
|
Thanks for replying to me.normaly if we want to know the ip address of our system we will give "ipconfig" command in the command prompt.and the system will give ipaddress as the output these output is seen in the console itself.in the same way....i want to give this command "ipconfig" in textbox and the ipaddress that we get as output should display in richtextbox...its not compulsory that i want to use textbox and only richtextbox......u can use any usercontrol as u like....
|
|
|
|
|
Hi all
While navigating in a form, how can I change the picture of an employee to another picture while pressing the button Next.
krish
|
|
|
|
|
How is the picture being drawn ? If in a picturebox, change the picture, if direct to screen, change the memory bitmap and call invalidate.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sir,
Please sent me a sample code for setting flag in VB.Net.
In database (Stored procedure) flag = 0 is Insert and flag = 1 is Update command. I couldn't write correct code in VB.Net.
Regards
Lijo Mathew
|
|
|
|
|
Can you explain exactly what the problem is? I don't think someone will understand the question you're asking.
WM.
What about weapons of mass-construction?
|
|
|
|