|
im off to bed, but, i WILL definetly check it out. iv never heard of that method before, ill look into it!
thank you very much!
------------------------
Jordan.
III
|
|
|
|
|
Hello everybody. I am new to VB.NET and i have the following code:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objPrint As New System.Drawing.Printing.PrinterSettings
Dim strItem As String
Dim strPrinters As String
For Each strItem In objPrint.InstalledPrinters
cmbPrinter.Items.Add(strPrinters & strItem)
Next
End Sub
I am able to get all the list of available printers and i want when i click on one of them a list to be filled with all available paper sizes for that printer. So far no luck. Can anyone help me. Thank you in advance...
Trying to find the way
|
|
|
|
|
.NET Framework Class Library
PrinterSettings.PaperSizes Property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingprintingprintersettingsclasspapersizestopic.asp
|
|
|
|
|
Thank you Anonymous. It has all the information needed. But still I can't seem to be able to make the paper size combobox to get the papers sizes of the printer that i have clicked on the printer combobox. I can only seem to be able to get the default's one. ARGGG!!! What am i doing wrong?
HEEEEELPPPPP
Trying to find the way
|
|
|
|
|
Without seeing your code, it's impossible to tell you. PaperSizes returns a collection. Are you enumerating the collection it returns or just using the first item from it?
We need to see the code...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok here is the code so far:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objPrint As New System.Drawing.Printing.PrinterSettings
Dim strItem As String
Dim strPrinters As String
For Each strItem In objPrint.InstalledPrinters
cmbPrinter.Items.Add(strPrinters & strItem)
Next
End Sub
Private Sub cmbPrinter_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPrinter.SelectedIndexChanged
' Add list of supported paper sizes found on the printer.
Dim searchstring As String
Dim SearchChar As String
Dim MyPos As Integer
Dim i As Integer
Dim pkSize As System.Drawing.Printing.PaperSize = Nothing
SearchChar = "A4"
For Each pkSize In printDoc.PrinterSettings.PaperSizes
lstPaper.Items.Add(pkSize.PaperName)
Next
For i = 0 To lstPaper.Items.Count - 1
lstPaper.SelectedIndex = i
searchstring = lstPaper.SelectedItem()
MyPos = InStr(searchstring, SearchChar)
If MyPos = 0 Then
lstPaper.Items.Remove(0)
Else
paperToUse = searchstring
End If
Next
updateDisplay()
End Sub
I can fill the combobox of the printers and the list box of the papers. BUT when i click on another printer the program DOSEN'T give me the list of the paper sizes on the new selected printer. It's like it stucks in the paper sizes of the default printer...
HEEEEEEEEEEEEEEEEEEEEEEEEEELP!!!
Trying to find the way
|
|
|
|
|
I was able to load the datagrid correctly and fill it. What I am trying now to accomplish is how to highlight a whole row when I user either tabs down or clicks the row. As of now it highlights just one column of the row. I want to be able to highlight the whole row and have a user click the row to get the info the user is requesting.
Thanks
Beginner in ASP.Net and VB.Net
|
|
|
|
|
.NET Framework Class Library
DataGrid.Select Method (Int32)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsDataGridClassSelectTopic1.asp
|
|
|
|
|
That is the right track but if a user clicks on (row 1 column 3) then all the data for (row 1 column 1) and (row 1 column 2) disappears and the whole row is highlighted. I have seen this done in programs so I know its possible.
Right now my rows alternate colors with light blue and baby blue. When a user selects a row they want to view, then I want to highlight that row to stand out like with a yellow or even a darker blue to make it look different from the rest.
Thanks
Beginner in ASP.Net and VB.Net
|
|
|
|
|
Highlight an Entire Row in VB.NET WinForms DataGrid
description:
http://www.freevbcode.com/ShowCode.asp?ID=5746
source:
http://www.freevbcode.com/source/HighlightingRowInDataGrid.zip
|
|
|
|
|
you've probably sorted it now but a really simple way would be
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
Dim oCell As DataGridCell
oCell = DataGrid1.CurrentCell
Dim lRowNum As Long
lRowNum = oCell.RowNumber
With DataGrid1
.Select(lRowNum)
End With
End Sub
"If i was king cigarettes would be free."
|
|
|
|
|
ok im relativly new
but im making a program using the inputbox's
and the inputnox colors and font is differnt than the rest of the program
if you know what to do please help
Beaker Rules!
|
|
|
|
|
You could make your own input box.
Make 2 forms in a blank project
Drag a CommandButton onto Form1
and a TextBox onto form2
'FORM1 CODE
Public Function InputBox2() As String
Form2.Show vbModal
InputBox2 = Form2.Variable
End Function
Private Sub Command1_Click()
Command1.Caption = InputBox2()
End Sub
'FORM1 CODE
'FORM2 CODE
Public Variable As String
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Variable = Text1.Text
Unload Me
End If
End Sub
'FORM2 CODE
Pretty simple, from there u can add whatever u want
|
|
|
|
|
|
not sure if anyone still uses this, but I installed .NetFramework 1.0 sp1
(released, aug31,2004) and after that I was getting some javascript errors.
I have a user control inside a webform. basically have login.ascx inside login.aspx. the login.ascx contains the <form> tag.
<form id="Form1" runat="server">
before the sp1 the form would render like this...
<form name="_ctl7:Form1" method="post"
action="Login.aspx"
id="_ctl7_Form1">
after sp1 it was this...
<form name="__aspnetForm" method="post"
action="login.aspx"
id="__aspnetForm">
It is killing some of my javascript where I look for
"_ctl:Form1"!
any help would be greatly appreciated.
Ganesan Muthiah
email:ganerathu@hotmail.com
|
|
|
|
|
Your question would be better handled in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to get a url with MSXML2.ServerXMLHTTP but turkish chacters in the url making problem that they seem as '?' how could I solve this problem.
Here is the my code....
<%<br />
Response.Buffer = true<br />
<br />
Dim objXMLHTTP, xml, text<br />
<br />
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")<br />
<br />
xml.Open "GET", "http://www.bektekeri.com/include/articles/article14.php", false<br />
xml.setRequestHeader "Content-Type", "xml/text"<br />
xml.setRequestHeader "characterset","windows-1254"<br />
xml.setOption(0) = 1524<br />
xml.Send<br />
<br />
text = xml.responsetext<br />
response.Write text<br />
<br />
Set xml = Nothing<br />
<br />
%>
karanba
|
|
|
|
|
Your question would probably be better handled in the XML Forum[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok im new to vbscript so i need a bit of help with linking to sub/function thats on a VB6 form from VBScript
i.e.
Sub Hey(Name)
If len(name) < 15 then
addq(name)
end if
End Sub
Thats basic,
Addq being the sub i want to link to in VB6
And Hey being called like thus
Private Sub Command1_Click()
sc.AddCode Text1.Text
Username = "QWRQWRQWRQWR"
sc.Run "Hey", Username
End Sub
Text1.Text containing that VBScript above.
Thanks for the help
|
|
|
|
|
I don't believe you can using the method that you are for running the script. The script engine has no method of retrieving the reference to the running Form object in VB6 and passing that reference to the script.
I could be wrong though...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
I don't believe you can using the method that you are for running the script. The script engine has no method of retrieving the reference to the running Form object in VB6 and passing that reference to the script.
I could be wrong though...
I believe you are wrong becasue i've seen it working using a method some what like that...
So there must be a way to do it
|
|
|
|
|
how can i populate values in a datagrid row by selecting the value in the combo box which is in the same datagrid.
for example if we have products table i should be able to select the first column which is the list of product names, by selecting the productnames i should be able to view it's price.
i am using vb.net
please help me
thank u
srikanth
|
|
|
|
|
hi,
I want to handle the event which is raised when data is copied to the clipboard. How can i solve it?
Thank you.
|
|
|
|
|
There is no such "event" generated. At least not is the sense your thinking about. In order to get notifications about changes in the clipboard, you'll have to register your windows with the clipboard viewer chain and then override WndProc in your form in order to receive the WM_DRAWCLIPBOARD message. This message is sent to all the registered clipboard viewer windows to notify them of a change on the clipboard.
Docs on the SetClipboardViewer[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello all
i want to add items in a listview under a particular column. i have multiple columns and on the click of a button i want to add item under a particular column. is it possible?
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|