|
thanks Jim..
I fixed the problem, I set the column width to 0 in dataGridTextBoxColumn..
Lisa
|
|
|
|
|
U can Use as follows
Dim dv As DataView = New DataView(Datatable)
dv.Table.Columns(0).ColumnMapping =MappingType.Hidden ' whats the Column U wanna Hide
dv.Table.Columns(3).ColumnMapping = MappingType.Hidden
me.Datagrid.Datasource = dv
|
|
|
|
|
this will hide a whole column!
DataGrid1.Tables(0).Columns("columnName").ColumnMapping = MappingType.Hidden
the column still exists in your datasource to pass
done
|
|
|
|
|
I am developing an applicationf for health card validation, I need to access serial card reader through COM Port, can anyone help how I can do that or what methodology can be implemented?
Many Thanks (Advance)
|
|
|
|
|
|
Hi all
I have been lookin more then 3 days for a solution for my problem...
Allthough i did progress in finding out what causes the problems, I dont have any clue what the solution might be...
I really hope someone here can help me out
THX AHEAD
the problem is the following:
I have made a web user control containing a DataGrid for editing a MS SQL table. It uses the DataGrid's OnSortCommand, OnEditCommand, OnUpdateCommand, OnCancelCommand, and it all works very nicely
BUT, when i try to integrate this web user control in my big project (a webportal) it stopped working and started acting really strange
after looots of searching and debugging this is what i found out:
When i integrate it in the portal, i let my web user control inherit ControlBase.vb instead of System.Web.UI.UserControl... ControlBase.vb itself inherits System.Web.UI.UserControl, so that should normally work
I got this ControlBase.vb technique out of an article on www.smartisans.com about "Creating a Visual Web Page Template" which u can find here: http://www.smartisans.com/articles/vb_templates.aspx
After looking futher i noticed that it is the Page_PreRender function in ControlBase.vb that cause my problems... when i comment this function out, everything works perfect again...
while debugging i noticed the folowing when the Page_PreRender function is included:
When loading the page the first time, it still works like it should... Page_Load in my web user control gets called, and since IsPostBack is false, a bindgrid() is done...
but when clicking one of the links in my datagrid, it goes wrong... The Page_Load function still gets called, but since IsPostBack is true this time, nothing is done... After this, NORMALLY, the event of link i clicked should be called (fe: the OnEditCommand event), but it aint called at all... so nothing happens, and my page remains empty...
After lots of trying i also noticed some strange things:
When doing a BindGrid() in Page_Load (even when IsPostBack is true), the events do get called, but things still get f***ed up, since no bindgrid() is needed then, the dataset gets filled twice, and even when including a dataset.clear() things still dont work as expected when sorting if a collumn is in editmode
Also i noticed the Page_PreRender function gets called twice every time
I hope someone has idea why all these strange things are happening to me, cause i dont...
EVERYTHING works PERFECT without the Page_PreRender, and i just cant get it working with it... (and i need the Page_PreRender for the nice Page Template technique i guess?)
somehow, somewhere the events just get lost.....
below u can find the structure of my solution WITH the page template (the one that doesnt work, just change "inherits ControlBase" to "inherits System.Web.UI.UserControl" to see it working, ull also need a working iis and an sql server with 1 table)
solution structure
solution: afdedit<br />
project (asp.net web application): afdedit<br />
webform: default.aspx<br />
web user control: afdedit.ascx<br />
project (class library): test<br />
klasse: ControlBase.vb
and below all the code:
default.aspx
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb" Inherits="afdedit.WebForm1"%><br />
<%@ Register TagPrefix="VAB" TagName="afdedit" Src="afdedit.ascx" %><br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><br />
<HTML><br />
<HEAD><br />
<title>WebForm1</title><br />
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"><br />
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1"><br />
<meta name="vs_defaultClientScript" content="JavaScript"><br />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"><br />
</HEAD><br />
<body MS_POSITIONING="GridLayout"><br />
<form id="Form1" method="post" runat="server"><br />
<VAB:afdedit runat="server" ID="afdedit" NAME="afdedit"></VAB:afdedit><br />
</form><br />
</body><br />
</HTML>
default.aspx.vb
Imports test<br />
<br />
Public Class WebForm1<br />
Inherits System.Web.UI.Page<br />
<br />
#Region " Web Form Designer Generated Code "<br />
<br />
'This call is required by the Web Form Designer.<br />
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()<br />
<br />
End Sub<br />
<br />
'NOTE: The following placeholder declaration is required by the Web Form Designer.<br />
'Do not delete or move it.<br />
Private designerPlaceholderDeclaration As System.Object<br />
<br />
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init<br />
'CODEGEN: This method call is required by the Web Form Designer<br />
'Do not modify it using the code editor.<br />
InitializeComponent()<br />
End Sub<br />
<br />
#End Region<br />
<br />
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
'Put user code to initialize the page here<br />
End Sub<br />
<br />
End Class
afdedit.ascx
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="afdedit.ascx.vb" Inherits="afdedit.afdedit" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %><br />
<DIV id="divAfdeling" align="center" runat="server"><br />
<asp:DataGrid id="DG" DataKeyField="afdelingid" AutoGenerateColumns="False" runat="server" AllowSorting="True"<br />
OnSortCommand="DG_sort" OnUpdateCommand="DG_Update" OnCancelCommand="DG_Cancel" OnEditCommand="DG_Edit"<br />
GridLines="Vertical" AlternatingItemStyle-BorderColor="#000000" AlternatingItemStyle-BackColor="LightGrey"<br />
ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" CellPadding="7"><br />
<AlternatingItemStyle HorizontalAlign="Center" BorderColor="Black" VerticalAlign="Middle" BackColor="White"></AlternatingItemStyle><br />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" BackColor="#CAC7A8"></ItemStyle><br />
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="Gray"></HeaderStyle><br />
<Columns><br />
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn><br />
<asp:BoundColumn Visible="False" DataField="afdelingid" SortExpression="afdelingid" ReadOnly="True"<br />
HeaderText="Afdeling ID"></asp:BoundColumn><br />
<asp:BoundColumn DataField="naam" SortExpression="naam" ReadOnly="True" HeaderText="Naam"></asp:BoundColumn><br />
<asp:BoundColumn DataField="omschrijving" SortExpression="omschrijving" HeaderText="Omschrijving"></asp:BoundColumn><br />
<asp:BoundColumn DataField="url" SortExpression="url" HeaderText="Url"></asp:BoundColumn><br />
</Columns><br />
<PagerStyle VerticalAlign="Middle" HorizontalAlign="Center"></PagerStyle><br />
</asp:DataGrid><br />
</DIV>
afdedit.ascx.vb
Public Class afdedit<br />
Inherits ControlBase<br />
<br />
#Region " Web Form Designer Generated Code "<br />
<br />
'This call is required by the Web Form Designer.<br />
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()<br />
Me.Conn = New System.Data.SqlClient.SqlConnection<br />
Me.DA = New System.Data.SqlClient.SqlDataAdapter<br />
Me.SelComm = New System.Data.SqlClient.SqlCommand<br />
Me.UpdComm = New System.Data.SqlClient.SqlCommand<br />
Me.DS = New System.Data.DataSet<br />
Me.DV = New System.Data.DataView<br />
Me.DT = New System.Data.DataTable<br />
CType(Me.DS, System.ComponentModel.ISupportInitialize).BeginInit()<br />
CType(Me.DV, System.ComponentModel.ISupportInitialize).BeginInit()<br />
CType(Me.DT, System.ComponentModel.ISupportInitialize).BeginInit()<br />
'<br />
'Conn<br />
'<br />
Me.Conn.ConnectionString = "server=SHAREPOINT;Database=Intranet;uid=sa;pwd=VAB7vtb5$"<br />
'<br />
'DA<br />
'<br />
Me.DA.SelectCommand = Me.SelComm<br />
Me.DA.UpdateCommand = Me.UpdComm<br />
'<br />
'SelComm<br />
'<br />
Me.SelComm.CommandText = "SELECT afdelingid, naam, omschrijving, url FROM Afdelingen"<br />
Me.SelComm.Connection = Me.Conn<br />
'<br />
'UpdComm<br />
'<br />
Me.UpdComm.CommandText = "UPDATE Afdelingen SET naam = @naam, omschrijving = @omschrijving, url = @url WHER" & _<br />
"E (afdelingid = @afdelingid); SELECT naam, omschrijving, url, afdelingid FROM Af" & _<br />
"delingen WHERE (afdelingid = @afdelingid)"<br />
Me.UpdComm.Connection = Me.Conn<br />
Me.UpdComm.Parameters.Add(New System.Data.SqlClient.SqlParameter("@afdelingid", System.Data.SqlDbType.Int, 4, "afdelingid"))<br />
Me.UpdComm.Parameters.Add(New System.Data.SqlClient.SqlParameter("@naam", System.Data.SqlDbType.VarChar, 100, "naam"))<br />
Me.UpdComm.Parameters.Add(New System.Data.SqlClient.SqlParameter("@omschrijving", System.Data.SqlDbType.VarChar, 100, "omschrijving"))<br />
Me.UpdComm.Parameters.Add(New System.Data.SqlClient.SqlParameter("@url", System.Data.SqlDbType.VarChar, 100, "url"))<br />
'<br />
'DS<br />
'<br />
Me.DS.DataSetName = "DataS"<br />
Me.DS.Locale = New System.Globalization.CultureInfo("nl-BE")<br />
'<br />
'DT<br />
'<br />
Me.DT.TableName = "afdelingen"<br />
CType(Me.DS, System.ComponentModel.ISupportInitialize).EndInit()<br />
CType(Me.DV, System.ComponentModel.ISupportInitialize).EndInit()<br />
CType(Me.DT, System.ComponentModel.ISupportInitialize).EndInit()<br />
<br />
End Sub<br />
Protected WithEvents DG As System.Web.UI.WebControls.DataGrid<br />
Protected WithEvents DA As System.Data.SqlClient.SqlDataAdapter<br />
Protected WithEvents DS As System.Data.DataSet<br />
Protected WithEvents DV As System.Data.DataView<br />
Protected WithEvents DT As System.Data.DataTable<br />
Protected WithEvents Conn As System.Data.SqlClient.SqlConnection<br />
Protected WithEvents SelComm As System.Data.SqlClient.SqlCommand<br />
Protected WithEvents UpdComm As System.Data.SqlClient.SqlCommand<br />
Protected WithEvents divAfdeling As System.Web.UI.HtmlControls.HtmlGenericControl<br />
<br />
'NOTE: The following placeholder declaration is required by the Web Form Designer.<br />
'Do not delete or move it.<br />
Private designerPlaceholderDeclaration As System.Object<br />
<br />
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init<br />
'CODEGEN: This method call is required by the Web Form Designer<br />
'Do not modify it using the code editor.<br />
InitializeComponent()<br />
End Sub<br />
<br />
#End Region<br />
<br />
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
'Put user code to initialize the page here<br />
If Not IsPostBack Then<br />
Session("EditID") = -1<br />
Session("Direction") = " ASC"<br />
Session("SortField") = "naam"<br />
BindGrid()<br />
End If<br />
End Sub<br />
<br />
' Sorteren op een bepaalde kolom door kolomhoofding aan te klikken<br />
Public Sub DG_sort(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles DG.SortCommand<br />
' Als een rij in "edit-modus" is<br />
If DG.EditItemIndex <> -1 Then<br />
FindEditPosKey()<br />
End If<br />
' Als er geklikt is op de kolom waarop al gesorteerd is<br />
If CType(Session("SortField"), String) = e.SortExpression Then<br />
' Indien oplopend wordt gesorteerd, aflopend sorteren, en analoog andersom<br />
If CType(Session("Direction"), String) = " ASC" Then<br />
Session("Direction") = " DESC"<br />
Else<br />
Session("Direction") = " ASC"<br />
End If<br />
Else<br />
Session("Direction") = " ASC"<br />
End If<br />
' Kolom onthouden waarop gesorteerd wordt<br />
Session("SortField") = e.SortExpression<br />
BindGrid()<br />
End Sub<br />
<br />
' Edit-layout voor een bepaalde rij activeren<br />
Public Sub DG_Edit(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DG.EditCommand<br />
DG.EditItemIndex = e.Item.ItemIndex<br />
BindGrid()<br />
End Sub<br />
<br />
' Updaten van een gewijzigde rij<br />
Public Sub DG_update(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DG.UpdateCommand<br />
' definieren van de textboxes gecreeerd door de edit-layout te openen voor een rij<br />
Dim tb_omschrijving As TextBox = CType(e.Item.Cells(3).Controls(0), TextBox)<br />
Dim tb_url As TextBox = CType(e.Item.Cells(4).Controls(0), TextBox)<br />
' vastleggen van alle cellen van de te wijzigen rij<br />
Dim afdelingid As Integer = CInt(e.Item.Cells(1).Text)<br />
Dim naam As String = e.Item.Cells(2).Text<br />
Dim omschrijving As String = tb_omschrijving.Text<br />
Dim url As String = tb_url.Text<br />
If omschrijving.Length = 0 Or omschrijving.Length > 30 Or Not Geen_SQL_Injection(omschrijving) Then<br />
' invoercontrole van omschrijving<br />
Fout("Ongeldige omschrijving... De omschrijving moet minstens 1 teken en mag maximum 29 tekens zijn... " & _<br />
"Volgende tekens zijn niet toegelaten: ', "", *, <, >")<br />
ElseIf url.Length < 8 Then<br />
' invoercontrole van url<br />
Fout("Ongeldige URL... Een URL begint met 'http:
ElseIf url.Substring(0, 7) <> "http://" Or Not Geen_SQL_Injection(url) Then<br />
' verdere invoercontrole van url<br />
Fout("Ongeldige URL... Een URL begint met 'http:
Else<br />
' als alle invoercontrole doorlopen is<br />
' sql parameters laden<br />
Me.UpdComm.Parameters("@afdelingid").Value() = afdelingid<br />
Me.UpdComm.Parameters("@naam").Value() = naam<br />
Me.UpdComm.Parameters("@omschrijving").Value() = omschrijving<br />
Me.UpdComm.Parameters("@url").Value() = url<br />
' connectie openen, rij updaten, connectie sluiten, edit-layout ongedaan maken en datagrid herladen<br />
Conn.Open()<br />
Me.UpdComm.ExecuteNonQuery()<br />
Conn.Close()<br />
DG.EditItemIndex = -1<br />
BindGrid()<br />
End If<br />
End Sub<br />
<br />
' Invoercontrole tegen SQL Injection<br />
Private Function Geen_SQL_Injection(ByVal code As String) As Boolean<br />
Return code.IndexOf("'") = -1 And code.IndexOf("*") = -1 And _<br />
code.IndexOf("<") = -1 And code.IndexOf(">") = -1 And code.IndexOf("""") = -1<br />
End Function<br />
<br />
' Foutmelding bij het wijzigen van een veld<br />
Private Sub Fout(ByVal bericht As String)<br />
DG.EditItemIndex = -1 ' edit-layout ongedaan maken<br />
BindGrid() ' datagrid herladen<br />
Response.Write(bericht) ' foutmelding tonen<br />
End Sub<br />
<br />
' Edit-layout ongedaan maken en datagrid herladen<br />
Public Sub DG_Cancel(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DG.CancelCommand<br />
DG.EditItemIndex = -1<br />
BindGrid()<br />
End Sub<br />
<br />
' Zoekt de primary key van het veld in "edit-modus"<br />
Private Sub FindEditPosKey()<br />
' Dataview vullen met gesorteerd op oude sorteer kolom<br />
DA.Fill(DS, "afdelingen")<br />
DV = DS.Tables("afdelingen").DefaultView<br />
DV.Sort = CType(Session("SortField"), String) & CType(Session("Direction"), String)<br />
' Primary key van rij in "edit-modus" opslaan<br />
Session("EditID") = DV.Item(DG.EditItemIndex).Row.Item(0)<br />
' DataSet leegmaken<br />
DS.Clear()<br />
End Sub<br />
<br />
' Herlaad de grid gesorteerd op SortField<br />
Private Sub BindGrid()<br />
' Dataview vullen en datagrid herladen<br />
DA.Fill(DS, "afdelingen")<br />
DV = DS.Tables("afdelingen").DefaultView<br />
DV.Sort = CType(Session("SortField"), String) & CType(Session("Direction"), String)<br />
DG.DataSource = DV<br />
DG.DataBind()<br />
' Indien een rij in "edit-modus" stond<br />
If CInt(Session("EditID")) <> -1 Then<br />
Dim RijIndex As Integer = 0<br />
' zolang er rijen zijn en zolang de primary key niet gevonden is, RijIndex verhogen<br />
While RijIndex < DG.Items.Count And CInt(DG.DataKeys(RijIndex)) <> CInt(Session("EditID"))<br />
RijIndex += 1<br />
End While<br />
' zoeken naar rij in "edit-modus" uitschakelen<br />
Session("EditID") = -1<br />
' de juiste rij in de "edit-modus" zetten<br />
DG.EditItemIndex = RijIndex<br />
' DataSet leegmaken<br />
DS.Clear()<br />
BindGrid()<br />
End If<br />
End Sub<br />
<br />
End Class
ControlBase.vb
Imports System<br />
Imports System.Web<br />
Imports System.Web.UI<br />
Imports System.Configuration<br />
Imports System.Data.SqlClient<br />
Imports System.Resources<br />
<br />
' ************************************************************<br />
' Controle klasse voor standaard layout van een pagina<br />
' ************************************************************<br />
<br />
Public Class ControlBase<br />
Inherits System.Web.UI.UserControl<br />
Private sHeader As String<br />
<br />
Public Property Header() As String<br />
Get<br />
Return sHeader<br />
End Get<br />
Set(ByVal Value As String)<br />
' Opmaak van de header<br />
sHeader = "<.h1>" & Value & "</.h1>"<br />
End Set<br />
End Property<br />
<br />
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.PreRender<br />
' Toevoegen van een header <br />
Me.Controls.AddAt(0, New LiteralControl(Header()))<br />
End Sub<br />
<br />
'Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)<br />
' writer.WriteLine(Header())<br />
'End Sub<br />
<br />
End Class
|
|
|
|
|
i just found this on http://www.jroller.com/page/CoBraLorD/20040812#asp_net_datagrid_events_not
ASP.NET: DataGrid events not firing without ViewState ? ( 12 aug 2004, 10:53:02 CEST )<br />
Many of us ASP.NET developers must have had this problems, DataGrid events don't fire unless you enable viewstate on the datagrid, or you rebind it on every page load (so before the eventhandler gets called). Viewstate can be a nasty thing, especially in combination with a datagrid, and since I have to target low bandwith users, I tend to drop the viewstate for my datagrids. <br />
<br />
So I must rebind the datagrid on every page load if I want to be able to catch events originating from a child control inside it. Reason for this: the controls inside a datagrid (like for example a LinkButton for every item) are only created when the data is actually bound. Let's say an ItemCommand is launched by clicking on a linkbutton in the datagrid. The page gets loaded on the other side, but its a postback and you don't databind() the grid (and viewstate is disabled). After the basic page load, the UI Page class will look for the control that raised the event, but, it won't find it since it has not yet been created. In the end the eventhandler will not get called. <br />
<br />
Now, if you don't want viewstate, a databind on every page load works fine in most cases. However, what if you have a very expensive query to fill up your datagrid. Or say you have a datagrid on a page, along with another set of buttons. Each of the buttons raises an event, but those events will navigate away from the page, so you definitely won't see that datagrid anymore. It's pretty damn annoying to end up loading the whole datagrid data ANYWAY, just to be able to handle that button click that immediately moves away from the current page. That's seriously one wasted query. <br />
<br />
However, there is a solution, and in fact, it's pretty easy !<br />
What you want to is basically intercept on what control an event is being called, and then decide if you should bind data to be able to actually 'catch' the event. For example: we know if an event is being called on any child control of our datagrid, we must rebind the datagrid first. If an event is being called on one of our buttons, we know we will simply redirect and we don't need to bind the datagrid for that. <br />
<br />
The answer is __EVENTTARGET. The event target is a request parameter that gets set automatically on the postback of a form. It is either set in the querystring or form collection (depending on your form method). In case of a control *inside* another control being called, the event target will show you something of the form 'XXXX:_ctl1:_ctl2...' where XXXX is the ID of a control you created manually. So, if you were to have a datagrid called dgUserList, a linkbutton event could very well be of the form dgUserList:_ctl2:_ctl0. <br />
<br />
What you could do then is in the Page_Load method, get the __EVENTTARGET value (you can easily use Request.Params instead of checking for both Form and QueryString separately) and check if the string dgUserList is somewhere in there (or if it starts with it). If so, we can be sure we need to rebind the datalist, else we're sure we don't have to, just to be able to handle the event. This allows you a more fine-grained control over when to rebind data to controls, and it can gain you some performance if your application would demand it. <br />
<br />
You could go quite far with this, actually linking up databinding with a set of events, before the actual eventhandlers are being executed.
it seems to go about the same problem, only i dont understand the solution and i still didnt get it working
also my viewstate is allready true, so i dont really understand why im having this problem?
|
|
|
|
|
hello,
i want to know how can i get the text which is under mouse cursor,even if the cusror is out of my application's window. I am using VB.Net
|
|
|
|
|
Sound simple enough, right? But, you've got ALOT of research to do. What you want to do is going to be nearly impossible beause of how Windows works and the number of different controls that can have text. You can probably go as far as getting the WHOLE text from a control, but you will find getting just the word under the cursor requires calling methods on controls that you can't call directly. This project will require an expert level of knowledge of Windows internals, MFC, ATL, control classes from a C++ view, (not VB.NET!), and COM Interop.
Have fun! Oh! You'll have to look very long and hard to find examples of any of this code on the web, if it exists at all.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear VB.NEt or C# Gurus,
Please comment on this:
Without using an Excel, i try to Draw a Diagramm using BitMap and Graphics.
The problem is the points for the drawing are a result of 2.Dim Array. And I don#t really know how to access them with a Graphics method.
E.g. I fill a DataTable with an Array of Result(3,4). I tried to use one of the DrawLine()
method:
graph.DrawLine(redPen, pts(i - 1).X, PictureBox1.Height _
- pts(i - 1).Y, pts(i).X, PictureBox1.Height - pts(i).Y)
DataType of Result(3, 4) is Single, and i is Integer.
To Loop through this Array i did
For i = 0 To 3
For j = 0 To 4
graph.DrawLine(redPen, pts(i - 1).X, PictureBox1.Height _
- ptsM(i - 1).Y, pts(i).X, PictureBox1.Height - pts(i).Y)
Next
Next
Please i am a NewBi who doesn't understand how to use these methods. Who can tell me what my mistake is?
I would like to scale the Coordinates, but I tried with PageScale(). It doesn't work either. Does anyone Know maybe another method?
Sorry for bothering You with my Problem, but i really can't solve it without your HELP.
I Appriciate any Help or Comment.
Regards
Mickael
|
|
|
|
|
If the Quetion on this thread is not understandable, let me know. Otherwise i really need any Help or comment. Please check it out.
Sorry for bothering and 1000 thanx for help
Regards
Acheto
|
|
|
|
|
Hello friends,
I am a bit confused, because i am new for this Forum for i have not much experience on programming with c# or VB.NET.
Please if there is someone who can give me maybe a hint or some kind of tip, I am already very thanfull for it. Otherwise i don#t like to go on your nerves anymore, i rather quit asking you again. So this is the last time, please some one say some thing on this Thread.
Regards
Acheto
|
|
|
|
|
I want algorithm for school timetabling scheduling. Pls...
|
|
|
|
|
And people in Hell want ice water!
Try searching Google[^] first.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there,
I am having a problem (sure-stopper) referencing a web service method exposed via COM+ 1.5 default SOAP service from VS.NET 2003 project IF either the return or byref parameters of the method contains DATASET type.
The error returned when referencing via vs.net 2003's Add WebReference is:-
-------------------------------------------------
d:\ComPlusWs\Tester\Web References\Goober\Reference.map(1): Custom tool error: Unable to import WebService/Schema. Unable to import binding 'Class1Binding' from namespace 'http://schemas.microsoft.com/clr/nsassem/ComPlusWs/ComPlusWs%2C%20Version%3D1.0.1890.25047%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db416c1d7cba26960'. Unable to import operation 'HelloWorld'. The datatype 'DataSet' is missing.
-------------------------------------------------
I am using VS.NET 2003 via VB.NET, i have tried on both Windows XP SP2 and windows 2003 server.
To re-generate the problem:-
1. create a vs.net 2003 library project called TestLibrary
2. Reference System.EnterpriseServices Imports System.EnterpriseServices. Inherits ServicedComponent for the class. Create a public function with at least one byref parameter or return value as DataSet.
3. Sign the project with Strong-Key
4. build the project and make sure it's successful.
5. Fire up vs.net cmd prompt, go to project's BIN directory
6. TYPE "gacutil /i testlibrary.dll" ENTER
7. TYPE "regsvcs testlibrary.dll" ENTER
8. Fire up Component Services
9. Fire up the property page of TestLibrary
10. go to Activation Tab, check "Server's Application", check "Run Application as NT Service"
11. Check "Uses Soap", provide a name for the virtual directory to host the Web Services (eg. MyTestVD, will then appear as http://localhost/MyTestVD). Disable security checking if u have problem
12. Save and applied all settings.
13. Now, create a vs.net 2003 Windows Application project as a Caller for the Web Service.
14. add web reference by pointing to the address http://localhost/MyTestVD/default.aspx
15. then click on the link appear on the page found by "Add Web Reference" page.
16. once u see the address is suffixed with ?WSDL, you may then add the reference to the project.
17. Similar ERROR as described above will appear.
Why does it behave this way? i suspect the WSDL engine used by COM+ 1.5 is different from the one incorporated by VS.NET 2003? Please kindly suggest the turn around for this problem. Thanks!!!
Best Regards,
Derek Tan
|
|
|
|
|
Hi,
My problem is as below:
I have a windows service viz. MyService it has a class MyServiceClass
It is controlled via a Snap-in MySnapinConsole using DCOM and it uses the CreateObject() to create an instance of the MyServiceClass.
Now I need to run multiple instance of this service on the same machine i.e. I want create Multiple Instance of the MyServiceClass and also
control each instance of the class using the respective Snap-in "MySnapinConsole".
Can anyone help me out with how to go about working on the above.
I also need to know as to how I could use the Namespace concept in VB 6.0
I know some of you have the right solution to my problem.
What you CANnot VISUALIZE you CANnot ACHIEVE.
|
|
|
|
|
As this is the first time I'm using the Webbrowser control, there's a lot I don't know. It is an instance of IE within VB app - is it ? So I beleive everything applicable/available to IE applies to the webbrowser control ? And IE is required to be installed - is it ? What if Opera or Firefox is the primary browser ?
So fundamentally, the question comes to what is the relationship between IE (or any browser on the system) and the Webbrowser control ? Dependencies ?
|
|
|
|
|
Can anyone explain to me how to display the current month. I have an applicatuion that I want to display the month but I don't want the month's number.
I have tried these line of code:
Label1.text = System.DateTime.Today.Month.ToString
and I have also tried
Label1.text = MonthName(3) But the problem with this is that it doesn't update when the month change. I would the my code to refect when the month changes just like it does for the days of the week and year.
Can anyone please help me...
Thanks cPod....
|
|
|
|
|
Not sure if I understand you correctly but if Im right you just have to combine your two statements:
<br />
Label1.Text = MonthName(DateTime.Today.Month)<br />
|
|
|
|
|
Hey Robert thanks a lot man. I thought I had tried that but I guess I didn't...
Thanks again....
Thanks cPod....
|
|
|
|
|
Install Framwork for Net 1.1 and my applications runs, however I cannot run my crystall reports.
I checked the help text and looked under deploying w/crystal reports. Told me to add a new project and do some addmerges, etc. However, that didn't work either.
When I try and run the crystal reports it says that it's trying to find some run.dll's.
Does anyone know how to deplosy or install where it will pick up the objects that are needed for crystal?
|
|
|
|
|
hi.. i used WMI to collect information from the remote pc's such as available disk space.. but the thing is 2 pc's has this exception:
System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at AutomationProject.WebForm4.diskdriveKMMARS() in C:\Inetpub\wwwroot\AutomationProject\WebForm4.aspx.vb:line 146
why is that so? the pc's were setup as " copied exactly from each other... any help? thanks...
|
|
|
|
|
RPC needs a windows service to be running. Look at the services list (somewhere in your control panel - Im using a german windows so I dont know how it is exctly called), find the RPC service and check if it is running.
|
|
|
|
|
The RPC service should always be running. I'd check to make sure that the two machines in question have the Windows Management Instrumentation service running, and that they are running with the latest service packs and patches.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
will, when i work with TextBox control on vb6,
i can writte from right to left or from left to right.
but, what is the problem?
the problem that i can not chang the direction of cursor itself?
can any one help me,i am waiting online..
|
|
|
|
|