
caeanis
Avatar/Signature-
Posts
40 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by caeanis
-
I have a Sharepoint aspx page that I want to play a media file which is determined by the link that is clicked to navigate to the page. So, if the user clicks the first link, it navigates to video_sandbox.aspx?pathtovideo.wmv On the sharepoint page (video_sandbox.aspx) I use request.querystring to retrieve the path of the file and I want to then insert it as the src or url of the mediaplayer object. This doesn't seem to be working. I've tried writing it both via javascript and vbscript. I don't have access to the masterpage that the video page is based on so I can't put it in a script of that master. Any suggestions? I have posted the versions of my code below: Javascript: <Code> // This works var path = "/Videos/" + Request.QueryString("vid"); // this does Not work document.all.vid.url = path; </Code> VBScript: <Code> Dim path ' This works path = "/Videos/" & Request.QueryString("vid") ' this does Not work document.all.vid.url = path </Code>
-
Nm. It occurred to me that I answered my own question.
-
I have a large document which is segmented into chapters. I have a lot of bookmarks in it which are referenced as links in other parts of the doc. What I want to do is preview a snippet of the text (say the innertext of the bookmarked paragraph). I've figured out how to create a div tag that will appear just to the right of the clicked link, but I'm not sure what the bestway to put text in it. Using a webresponse stream seems like an inefficient way to grab the text, I'm wondering if there is a simpler way to retrieve the inner text by calling the paragraph's id and returning the innertext... In any case is there a better way to accomplish this?
-
UpdateList Method for Sharepoint Lists Web Service
caeanis replied to caeanis's topic in Windows Forms
Nevermind, I figured it out. When you click on Add Service Reference you can't select the reference from there, you click on the advanced button in the lower left corner which takes you to the Web Service dialog. -
I am trying to write a windows form app that allows me to update a Sharepoint List. Every example I've seen says that once add a web reference to the list using http://server_name/_vti_bin/Lists.asmx you can use that reference to create web service instance, a method of which is List so a declaration should look like Dim listService As New sp.Lists() or Dim listService as sp.Lists = New sp.Lists() However, when I create the reference, Lists is not a method under the namespace sp which is what I called my web service reference. when I type "sp." Lists doesn't appear in the intelli type drop down as an option. I get all sorts of other things like ListsSoapClient and GetListRequest, but not Lists. What am I doing wrong?
-
I know that you can select a particular row or cell but I want to raise the mouseclick even on a particular cell as I have code in the mouseclick even that I'd like to execute. Does anyone know how I can do this?
-
Scraping Siebel ActiveX Controls...
caeanis replied to caeanis's topic in Database / XML / Reporting
That is great! Thanks for the tip! I don't suppose you might have a snippet of code that demonstrates how they access a particular list do you? I'm trying to find an API guide that will show me how to find the particular control I want to get data from. Not sure if I have to access the control down through a rigid dom or whether I can directly access the list once I have it's handle or id or whatever. -
Getting the Clipboard paste change event in VB.NET
caeanis replied to caeanis's topic in Windows Forms
Very interesting! GetClipboardSequenceNumber... Sound promising. I figured out how to capture the paste event from within the textbox control, by overriding winproc, but now the custom text control doesn't appear on my form. Sigh. :( -
I have a custom textbox class that is set public scope. I created it because I needed to override the WndProc sub to handle paste messages sent from this control. The problem I'm having is that when the form is compiled, I get no error messages but the textbox doesn't show on the form. I've posted my code below, and would appreciate any observations on what I missed. I'm sure it's something simple... Public Class optyTextBox Inherits System.Windows.Forms.TextBox Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Const WM_PASTE As Int32 = &H302 Select Case m.Msg Case WM_PASTE ' The clipboard contents were pasted... 'Code to handle paste event. End Select End Sub End Class Shared WithEvents txtZip As optyTextBox Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load txtZip = New optyTextBox txtZip.Name = "txtZip" txtZip.Font = New System.Drawing.Font("Tahoma", 6.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) txtZip.Location = New System.Drawing.Point(142, 160) txtZip.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) txtZip.Size = New System.Drawing.Size(59, 18) txtZip.TabIndex = 28 txtZip.Visible = True ' Shouldn't this work? Me.Controls.Add(txtZip) txtZip.Show() ' I tried using this line to see if it forced the control to 'be visible but no dice... End Sub
-
Getting the Clipboard paste change event in VB.NET
caeanis replied to caeanis's topic in Windows Forms
Ok I see what I did wrong, WM_PASTE is a message sent from the app to the window or control I'm pasting into. It is NOT a notification which is why it doesn't trigger as a notification. So, it appears that it isn't possible, at least not the way I'm trying to do it. -
Getting the Clipboard paste change event in VB.NET
caeanis replied to caeanis's topic in Windows Forms
Ok I found some code that allows me to access the win32 clipboard and functions however it doesn't appear to be working. I added the code below to the form1.vb module. Does this appear to be correct? <code> #Region " Definitions " 'Constants for API Calls... Private Const WM_DRAWCLIPBOARD As Integer = &H308 Private Const WM_CHANGECBCHAIN As Integer = &H30D Private Const WM_PASTE As Integer = &H302 'Handle for next clipboard viewer... Private mNextClipBoardViewerHWnd As IntPtr 'API declarations... Declare Auto Function SetClipboardViewer Lib "user32" (ByVal HWnd As IntPtr) As IntPtr Declare Auto Function ChangeClipboardChain Lib "user32" (ByVal HWnd As IntPtr, ByVal HWndNext As IntPtr) As Boolean Declare Auto Function SendMessage Lib "User32" (ByVal HWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Long #End Region #Region " Contructor " Public Sub New() 'To register this form as a clipboard viewer... mNextClipBoardViewerHWnd = SetClipboardViewer(Me.Handle) InitializeComponent() End Sub #End Region #Region " Message Process " 'Override WndProc to get messages... Protected Overrides Sub WndProc(ByRef m As Message) Select Case m.Msg Case Is = WM_DRAWCLIPBOARD 'The clipboard has changed... '########################################################################## ' Process Clipboard Here :)........................ '########################################################################## SendMessage(mNextClipBoardViewerHWnd, m.Msg, m.WParam, m.LParam) Case Is = WM_CHANGECBCHAIN 'Another clipboard viewer has removed itself... If m.WParam = CType(mNextClipBoardViewerHWnd, IntPtr) Then mNextClipBoardViewerHWnd = m.LParam Else SendMessage(mNextClipBoardViewerHWnd, m.Msg, m.WParam, m.LParam) End If Case Is = WM_PASTE ' The clipboard contents were pasted... Select Case intCtrl Case 0 Clipboard.SetText(txtStrNum.Text) intCtrl = 1 Case 1 cmdParse.PerformClick() intCtrl = 2 Case 2 If isOptyTeam = False Then isOptyTeam = True Else Clipboard.SetText(txtOptyName.Text) intCtrl = 3 End If Case 3 Clipboard.SetText(txtDue.Text) intCtrl = 4 Case 4 End Select End Select MyBase.WndProc(m) End Sub #End Region #Region " Dispose " #End Region </code> -
I have to do some basic data entry in a web app I don't have administrative access to. I am pulling the data to be entered from my own vb form app. What I'd like to do is monitor the paste event (if there is such) of the clipboard to automatically load the next piece of data into the clipboard so that I can right click and paste with out having go back to my form each time. Is this possible? I've seen a view examples in C# on how to monitor the clipboard change event, but am not familiar with C#. Thanks in advance.
-
Is it possible to use a Panel control instead of navigating to a frame? I have a website that uses a header frame and then a vertical frame under it (not unlike the MSDN library). I am curious to know if I could achieve the same navigational functionality by using a panel in place of the right frame, so that when a link is clicked in the treeview, the page comes up in the panel. Does anyone know if this is possible or if there is another way to accomplish this without using frames? Thank you in advance...
-
My team supports Siebel 7.8 where the client is basically activex controls embedded in a web page in several layers of frames. I want to know if it is possible to retrieve values from specific fields within one of those controls? I have used spy to find the classname of the control in question but from there, I'm at a loss for how use that info to retrieve the values. Screen Scraping using httpwebrequest doesn't get the data I'm looking for. Is it possible to use findwindow api's to pull the data?
-
I have a small vb.net app that I used to pull data from a website. I want to be able to pull up window in another application (Remedy) and populate data in a given Remedy Ticket Window. Is there a way to access a specific control with thing the Remedy app, like for instance a combobox which provides choises for issue type, or issue description? I use FindWindow to point to the right window and this works but I'm not sure if it's possible to set focus to a particular control in that window and either set its value with a string or to choose a specific choice if its a combobox. Is this possible?
-
I am working on a time submittal form which uses the datetimepickers with the time format to enter log in , Lunch out, Lunch in and log out times. I have set up a dialog with which we can save default values (like a property page) to the settings. It is supposed to set the values for the datetimepickers to these values on the load event and also save the values entered in the dialog back to settings. However on load it defaults the Time in dtp (datetimepicker) value to the current time, and ignores the rest of the dtps. How can I force the date to a specific time, say 5:00 AM or 6:00 AM? I found that if I put in a message box to pull the settings for time and display them, the Time in Setting shows up as the current time not the amount I entered in the dialog.
-
I did find another way to do what I was trying to do but that is what I was looking for, didn't know about that property, thanks!
-
I have a VB.NET treeview control that is five levels deep. I am trying to figure out how to determine which level a given node is at. For instance if the hierarchy is as follows: Root Branch Bough Limb Leaf I would like return the value that the currently selected node is at, be it branch or limb or whatever. Is there a built in property in the the Treeview that returns this or is the a relatively simple way code for it?
-
The xml file is on the same server, same web folder as the asmx file. Here is my web service code: Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Xml Imports Microsoft.VisualBasic <WebService(Namespace:="ws")> _ <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Public Class ListManager Inherits System.Web.Services.WebService Dim XmlPath As String = "list.xml" Dim listDoc As New XmlDocument Dim node As XmlNode Dim strList As String = "" Dim nms As XmlNodeList <WebMethod()> Public Sub SetList(ByVal cbo As String, ByVal NameList As String) Dim NameNode = Nothing Dim node As XmlNode Dim nms As XmlNodeList = Nothing Dim listDoc As XmlDocument = New XmlDocument() Dim ws As XmlWhitespace = listDoc.CreateWhitespace(ControlChars.CrLf) Dim tb As XmlWhitespace = listDoc.CreateWhitespace(ControlChars.Tab) On Error GoTo ErrResponse listDoc.Load(Server.MapPath(XmlPath)) Select Case cbo Case "Name" nms = listDoc.SelectNodes("/List/Team/Name") NameNode = listDoc.SelectSingleNode("/List/Team") Case "Reason" nms = listDoc.SelectNodes("/List/Reasons/Reason") NameNode = listDoc.SelectSingleNode("/List/Reasons") Case "Type" nms = listDoc.SelectNodes("/List/Types/Type") NameNode = listDoc.SelectSingleNode("/List/Types") End Select Dim i As Integer 'Assign the string of comma delimited values to an array Dim listToTxt() As String = Split(NameList, ",") For i = 0 To UBound(listToTxt) 'If Item is NOT found in the collection of nodes then add it If IsDupe(nms, listToTxt(i)) = False Then node = listDoc.CreateNode(XmlNodeType.Element, "", cbo, "") node.InnerText = listToTxt(i) NameNode.AppendChild(node) 'Indent the new node NameNode.InsertBefore(tb, node) 'Insert a carriage return after the new node NameNode.InsertAfter(ws, node) End If Next listDoc.Save(Server.MapPath(XmlPath)) ErrResponse: If Err.Number > 0 Then Resume Next End If End Sub <WebMethod()> Public Function GetList(ByVal cbo As String) As String On Error GoTo ErrResponse listDoc.Load(Server.MapPath(XmlPath)) Select Case cbo Case "Name" nms = listDoc.SelectNodes("/List/Team/Name") Case "Reason" nms = listDoc.SelectNodes("/List/Reasons/Reason") Case "Type" nms = listDoc.SelectNodes("/List/Types/Type") End Select ' Loop through the nodes and add the names to the list For Each node In nms If Len(strList) = 0 Then strList += node.InnerText Else strList += "," & node.InnerText End If Next Return strList ErrResponse: If Err.Number > 0 Then Resume Next End If End Function <WebMethod()> Public Sub RemoveEntry(ByVal cbo As String, ByVal nme As String) On Error GoTo ErrResponse Dim rmNode, srchNode As System.Xml.XmlNode listDoc.Load(Server.MapPath(XmlPath)) 'Select the node to search srchNode = listDoc.SelectSingleNode("/List/" & cbo) ' Loop through the children nodes and find the one to remove For Each rmNode In srchNode.ChildNodes If rmNode.InnerText = nme Then 'Remove the specified node srchNode.RemoveChild(rmNode) 'Save the file listDoc.Save(Server.MapPath(XmlPath)) Exit For End If Next ErrResponse: If Err.Number > 0 Then Resume Next End If End Sub Private Function IsDupe(ByVal ns As XmlNodeList, ByVal strEntry As String) As Boolean Dim node As XmlNode For Each node In ns If node.InnerText = strEntry Then Return True Exit Function End If Next Return False End Function End Class
-
I was tasked to find a way to allow our team to dynamically pull down a set of lists within a Time Correction program we wrote. I figured that putting an xml file on a web server and use a webservice to not only call the specific lists but also allow us to update it as well. The web service does what it is supposed to do, we can retrieve a list of users, update the list with new members or delete them as we see fit. The problem is, it only appears to return data when I browse to it in the browser. When I try to do the same via the vb.net form, it doesn't error, it just doesn't return the expected string. I found that it does if I deploy the web service locally on my own box in IIS, but that of course defeats the purpose of accessing it anywhere. I noticed that when I test it using the test page that the returned string actually comes back in a separate window; I wonder if this is why our form doesn't get the data because it's not being directed back to where the request originated. Any ideas about this? Thank you! Caeanis
-
We have a time submittal form that we are working on. He created the initial form and emailed me a copy of the project. For some reason the actual form file is missing or incomplete. The *.vb file is there, but it doesn't have the form icon and the form designer view isn't available. When I look at it on his computer, the frm.vb file has a shortcut icon on it, as though it reverences another location. But there isn't any thing at that physical location. Does anyone know why this may be and how I might look for the actual referenced file. I could recreate it but I'd prefer not to reinvent the wheel. Thank you in advance. Caeanis
-
I have file that I'm writing to using the appendchild function and then save. It works, but the problem is that it doesn't insert line item and indent the tag properly, each childnode gets written on the same line one after another. Is there a function or class that can indent the child nodes automatically besides doing it via xmltextreader?
-
What I want to do is add items to a combobox list that when the app is closed will be saved and preserved for the next time the app it open. I am not sure whether using an xmlfile would be the right thing to use or maybe a class of some sort that will act as a simple data store. I want to avoid using an external text file and streamwriter or reader if possible. What would be the most simple approach to do it? Any suggestions would be welcome. Thank you!
-
How to tell the differences between ASCI and Unicode string?
caeanis replied to dragon4spy's topic in General
This is not quite as easy as it sounds. I've been looking all night via the net for how to get a vulgar fraction to display, whether on the console or in a messagebox or written to an xml file (which is ultimately what I'm trying to do.) I find that no matter what I try I get the square symbol that the system prints when it doesn't know how to generate the character. I am looking for info for system.text but I haven't seen anything that will allow me to preserve the character I want to display.