|
Your question has nothing to do with Visual Basic.NET. You would be better served to post your question in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What would be the best way to pause all incoming print jobs to a printer, and then start some code once the job is paused? For instance ask for user credentials before resuming print job.
Thanks Brandon
http://print-track.sourceforge.net
|
|
|
|
|
You can EASILY get around such security by just printing directly to the printer using IP Print. No print queues involved... In any case, the better way to do that is to rely on the security features of the O/S. BTW: A small job can still get printed before you have the opportunity to pause it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
any one know how to open up notepad with a button click?
|
|
|
|
|
|
okay looks like that will help a bunch.
thanks
|
|
|
|
|
How can I set the icon of the .exe of my form-less app?
Pablo.ar
|
|
|
|
|
You can set the Icon in the Project Properties window under Common Properties/Build.
Incedentally you can use this to add an application icon to any project by changing the output type to windows application, set the icon, save the properties, then change the output type back to whatever it was before. I use this trick to set application icons for DLLs which can then use the icon in add/remove programs by referencing it in the installer package.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
The Man from U.N.C.L.E. wrote:
You can set the Icon in the Project Properties window under Common Properties/Build.
I assume you mean that at that tab, there is a 'drop-down' list with all the available icons you can use... Well, in my FORM-LESS project, that list is empty! I suppose it is empty because none of the objects in the project have an 'Icon' property (actually, there is only ONE object, a .bas module).
Still needing help...
Best regards,
Pablo.ar
|
|
|
|
|
there are two ways to get icons into that list.
1) Add any icons to the project and set them to be Embeded Resources.
2) Use the Elipsis button next to the dropdown to browse for the required icon and add it to the project.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Hi,
I am working on Datagrid and i am struggling to format a row in the datagrid to a currency formatting. Do any one know about it, please help me out.
Thanks & Regards
Dhakshna
Smile
Never Makes an enemy
But Often
Makes A Friend
|
|
|
|
|
m_dhakshna wrote:
Hi,
I am working on Datagrid and i am struggling to format a row in the datagrid to a currency formatting. Do any one know about it, please help me out.
Are you sure you didn't mean 'column' instead of 'row'? Because I investigated the property page of the datagrid, and there is a tab named 'Format' where you can choose the format of a specified column.
Cheers,
Pablo.ar
|
|
|
|
|
Hi,
I am sure that i have to format a row and not a column.
Thanks & Regards
Dhakshna
|
|
|
|
|
I appreciate the convenience of adding a dataset 'control' to my forms, but I would like to only have one set of this data in my app, not one set per form.
But if I reset the form dataset to point at the 'global' dataset, then I have to redo all the binding, which seems not only a bit of a drag, but also an indication that there must be a better way.
I have sort of achieved a singleton dataset using the following code, but I have hardly tested it and I'm not at all sure whether this is the correct way to go. So I thought I'd ask the gurus out there...
Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml
<serializable(), system.componentmodel.designercategoryattribute("code"),=""
system.diagnostics.debuggerstepthrough(),="" system.componentmodel.toolboxitem(true)=""> _
Public Class SingletondsPop
Inherits dsPop 'My strongly-typed dataset (dsPop.xsd)
Private Shared mdsPop As dsPop
Public Shared ReadOnly Property dsPop() As dsPop
Get
Return mdsPop
End Get
End Property
Shared Sub New()
If mdsPop Is Nothing Then
mdsPop = New dsPop
End If
End Sub
End Class
|
|
|
|
|
Anyone know how to have a keypress mimic the mouse clicking on a button. i.e. I have a button with the number "1" on it. When I press the number 1 key, I would like the button "1" to go up and down like it was pressed with the mouse.
Thanks,
Tim
|
|
|
|
|
Hi,
I would like to scan my filsystem and create a list of all files and directories which I will output to a file. I would then Like to read this file and manipulate it by replacing various strings that match a certain criteria.
The output from the directory list is over 200MB. Could you tell me what is the most ifficient way of reading/manipulating this file. I tried the following routine but it braught my system to a hault.
Function GoReadFileToString(ByVal lvFilePath As String)
Dim lvReadFileOut As String
If File.Exists(lvFilePath) = True Then
Dim fsStream As New FileStream(lvFilePath, FileMode.Open, FileAccess.Read)
Dim srReader As New StreamReader(fsStream)
lvReadFileOut = srReader.ReadToEnd
Replace(lvReadFileOut, "d:\directory1", "")
srReader.Close()
Return (lvReadFileOut)
End If
End Function
Thanks,
|
|
|
|
|
Since your using .ReadToEnd , yes, it will bring your system to a halt while the reader is busy filling RAM with 200MB of data. Any other solution will be slower, but will not hold Windows hostage until it completes:
Function GoReadFileToString(ByVal lvFilePath As String) As String()
If File.Exists(lvFilePath) = True Then
Dim Index As Integer = 0
Dim lvReadFileOut() As String
Dim fsStream As New FileStream(lvFilePath, FileMode.Open, FileAccess.Read)
Dim srReader As New StreamReader(fsStream)
Do While srReader.Peek > 0
lvReadFileOut(Index) = srReader.ReadLine()
Replace(lvReadFileOut(Index), "d:\directory1", "")
Application.DoEvents()
Loop
srReader.Close()
Return (lvReadFileOut)
End If
End Function
But, why would you want to read 200MB of data anyway? Why not just create a class that wraps the file and opens it, reads it one line at a time PER CALL by the client using the class, does it's replace processing and then returns the line to the called. When the caller is done, it can call a Close method in your class to release the file. MUCH less RAM will be consumed using a process like this and you won't have to worry about the system dropping 200MB into the swap file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I tried your function and I am getting the following error message on "lvReadFileOut(Index) = srReader.ReadLine()". Do you know how I could fix this?
Error:
"An unhandled exception of type 'System.NullReferenceException' occurred in eLS.exe. Additional information: Object reference not set to an instance of an object."
I am kind of new to programming so I am not too familiar with the class. Do you have an example of this?
Idealy I want to replace lines of a file without having to read it into a variable then write it back out to a new file. I also want a solution that is quick and ifficient.
Thanks,
|
|
|
|
|
Zenly wrote:
Idealy I want to replace lines of a file without having to read it into a variable then write it back out to a new file.
I'm not going to ask why you tried to read a 200MB file into a string variable then.
Zenly wrote:
Idealy I want to replace lines of a file without having to read it into a variable then write it back out to a new file. I also want a solution that is quick and ifficient.
Then process the file one line at a time. The solution is to open TWO file streams. One for reading the source file and the other for writing the destination file. Read the source file, using .ReadLine(), into a string variable, call your Replace function on it, then write the new line out to your second file. Keep doing this until you reach the end of the source file, see the example code for the reference to Peek. If Peek returns anything less than 0, you've reached the end of the file.
Private Sub ProcessFile(ByVal sourceFilePath As String, ByVal destFilePath As String)
If File.Exists(lvFilePath) = True Then
Dim lineToProcess As String
Dim srcStream As New StreamReader(sourceFilePath)
Dim destStream As New StreamWriter(destFilePath)
Do While (srcStream.Peek >= 0)
lineToProcess = srcStream.ReadLine()
Replace(lineToProcess, "d:\directory1", "")
destStream.WriteLine(lineToProcess)
Loop
srcStream.Close()
destStream.Close()
End If
End Function
* This code is not guaranteed to compile, let alone work. It is intended as a guide only, to be worked out and fixed by you, the reader!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks you so much for helping me with this. I am now able to read,replace, and write to a new file within 30seconds. And not adversly affect my system.
Thanks,
|
|
|
|
|
Hey,
I really need to be able to make a button that stops my ThreadPool but i am really stuck on how to do it.
Any help would be greatly appreciated as this is really urgent
Chris
|
|
|
|
|
Hi, I need find the handle of button "OK" of Application, and later to push it. I've used this method, but it's very difficult for me, can anyone help me, please?:
Dim handleRefresh As IntPtr
Dim pdwSize As Long
pdwSize = FindWindow(vbNullString, "OK")
handleRefresh = Marshal.AllocHGlobal(Marshal.SizeOf(pdwSize))
SendMessage(handleRefresh, WM_LBUTTONDOWN, 0, 0)
SendMessage(handleRefresh, WM_LBUTTONUP, 0, 0)
RDG, thanks!
|
|
|
|
|
Hi
I am developing an application which requires me to parse HTML pages and gathervarious information such as title, author etc. i figured out that the best way to do this is to use regular expressions. while using regular expressions, i faced a lot of problems, one was of proper expression and then the other one was how to extract the complete strings . actually first to check whether there is author, then get its contents.
Can anyone help me with this, sample code would be of great help.
thanks in advance.
|
|
|
|
|
How can I change a main menu's bar colour?
I can change menuitem color. But i want to change color of whole bar (complete menu bar from 0 to 100%).
Is it possible to change it?
Thanks
Sumit Domyan
|
|
|
|
|
The the menu bar color is determined by the system (Display properties, Appearance tab), coloring is not supported. You'll either have to write your own MainMenu class, inheriting from MainMenu, and ownerdraw the menu bar yourself, search the articles on CP for an example, or use a third party component that exposes this kind of functionality.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|